Files
mercury/tests/invalid/spurious_mode_error.err_exp
Fergus Henderson 6b610a7444 Fix a bug where type errors were causing spurious mode errors,
Estimated hours taken: 6

Fix a bug where type errors were causing spurious mode errors,

compiler/post_typecheck.m:
	Add new predicate post_typecheck__ill_typed_pred,
	which just module-qualifies the pred declaration for that pred.
	This is necessary to avoid spurious mode errors in predicates
	that call the ill-typed pred.

compiler/typecheck.m:
	Call post_typecheck__ill_typed_pred on ill-typed predicates
	before calling module_info_remove_pred.  We need to call it
	here because later passes won't process the pred once it
	has been removed.

tests/invalid/Mmakefile:
tests/invalid/spurious_mode_error.m:
tests/invalid/spurious_mode_error.err_exp:
	Regression test for the above-mentioned bug.
1998-10-29 03:55:28 +00:00

4 lines
200 B
Plaintext

spurious_mode_error.m:079: In clause for predicate `spurious_mode_error:foldit/4':
spurious_mode_error.m:079: error: undefined predicate `foobie/3'.
For more information, try recompiling with `-E'.