Files
mercury/tests/invalid/html.err_exp
Zoltan Somogyi 2028df3f20 Fix references to func results in a mode error.
compiler/mode_errors.m:
    If the argument whose instantiation we are complaining about is
    the result of a function, say so.

tests/invalid/mode_error_arg_number.{m,err_exp}:
    Add a test of this message.

tests/invalid/bug117.err_exp:
tests/invalid/coerce_int.err_exp:
tests/invalid/html.err_exp:
tests/invalid/inst_matches_final_bug.err_exp:
    Expect the correct reference to function results in these test cases.
2022-10-01 13:06:20 +10:00

74 lines
3.1 KiB
Plaintext

html.m:053: In clause for `init_body_elem =
html.m:053: out(html.non_empty_list((html.top_body_elem)))':
html.m:053: mode error: the function result had the wrong instantiatedness.
html.m:053: Final instantiatedness of `HeadVar__1' was `unique',
html.m:053: expected final instantiatedness was
html.m:053: named inst non_empty_list(top_body_elem)
html.m:053: which expands to
html.m:053: bound(
html.m:053: '[|]'(
html.m:053: named inst top_body_elem
html.m:053: which expands to
html.m:053: bound(
html.m:053: text(ground)
html.m:053: ;
html.m:053: ul(
html.m:053: named inst non_empty_list(
html.m:053: li(
html.m:053: named inst top_body_elem
html.m:053: )
html.m:053: )
html.m:053: which expands to
html.m:053: bound(
html.m:053: '[|]'(
html.m:053: named inst li(
html.m:053: named inst top_body_elem
html.m:053: )
html.m:053: which expands to
html.m:053: bound(
html.m:053: li(
html.m:053: named inst
html.m:053: non_empty_list(top_body_elem)
html.m:053: )
html.m:053: ),
html.m:053: named inst list.list_skel(
html.m:053: named inst li(
html.m:053: named inst top_body_elem
html.m:053: )
html.m:053: )
html.m:053: which expands to
html.m:053: bound(
html.m:053: []
html.m:053: ;
html.m:053: '[|]'(
html.m:053: named inst li(
html.m:053: named inst top_body_elem
html.m:053: ),
html.m:053: named inst list.list_skel(
html.m:053: named inst li(
html.m:053: named inst top_body_elem
html.m:053: )
html.m:053: )
html.m:053: )
html.m:053: )
html.m:053: )
html.m:053: )
html.m:053: )
html.m:053: ),
html.m:053: named inst list.list_skel(
html.m:053: named inst top_body_elem
html.m:053: )
html.m:053: which expands to
html.m:053: bound(
html.m:053: []
html.m:053: ;
html.m:053: '[|]'(
html.m:053: named inst top_body_elem,
html.m:053: named inst list.list_skel(
html.m:053: named inst top_body_elem
html.m:053: )
html.m:053: )
html.m:053: )
html.m:053: )
html.m:053: ).