Files
mercury/tests/invalid/coerce_int.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

32 lines
1.3 KiB
Plaintext

coerce_int.m:026: In clause for `bad(in(coerce_int.wrap(bound(1 ; 2)))) =
coerce_int.m:026: out(coerce_int.wrap(bound(1 ; 3)))':
coerce_int.m:026: mode error: the function result had the wrong
coerce_int.m:026: instantiatedness.
coerce_int.m:026: Final instantiatedness of `HeadVar__2' was
coerce_int.m:026: `bound(wrap(bound(1 ; 2)))',
coerce_int.m:026: expected final instantiatedness was
coerce_int.m:026: named inst wrap(
coerce_int.m:026: bound(
coerce_int.m:026: 1
coerce_int.m:026: ;
coerce_int.m:026: 3
coerce_int.m:026: )
coerce_int.m:026: )
coerce_int.m:026: which expands to
coerce_int.m:026: bound(
coerce_int.m:026: wrap(
coerce_int.m:026: bound(
coerce_int.m:026: 1
coerce_int.m:026: ;
coerce_int.m:026: 3
coerce_int.m:026: )
coerce_int.m:026: )
coerce_int.m:026: ).
coerce_int.m:032: In clause for `bad_wrong_type(in(coerce_int.wrap(bound(1 ;
coerce_int.m:032: 2)))) = out(coerce_int.wrap(bound(1 ; 2)))':
coerce_int.m:032: in coerce expression:
coerce_int.m:032: mode error: in the argument term:
coerce_int.m:032: in the argument of function symbol `wrap':
coerce_int.m:032: the instantiatedness of the subterm `bound(1 ; 2)' is
coerce_int.m:032: invalid for the type of the subterm `uint'.