mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 19:03:45 +00:00
compiler/typecheck_error_undef.m:
... only if that predicate or function was declared by the user.
If the compiler itself added the pred/func declaration implicitly
because it saw a clause for that pred/func, but then decided not to
add that clause to the HLDS after all because it had syntax errors,
then don't complain about the absence of a clause for a pred/func
that the user did not declare.
tests/invalid/state_vars_test3.err_exp:
Expect no complaint about a missing clause in the above situation.
8 lines
413 B
Plaintext
8 lines
413 B
Plaintext
state_vars_test3.m:011: Error: no clauses for function `f'/1.
|
|
state_vars_test3.m:017: Error: clause for function `f'/2
|
|
state_vars_test3.m:017: without corresponding `:- func' declaration.
|
|
state_vars_test3.m:017: However, a function of that name does exist with
|
|
state_vars_test3.m:017: arity 1.
|
|
state_vars_test3.m:017: Error: !Y cannot be a function result.
|
|
state_vars_test3.m:017: You probably meant !:Y.
|