mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 02:43:40 +00:00
compiler/det_report.m:
When a switch is wrapped in a require_switch_arms_<detism> scope
but a switch arm violates the requirement, we generate an error message.
Modify that message to identify both the switched-on variable and
the functor(s) of the arm with the determinism error.
compiler/det_util.m:
To make it possible to print the name of the switched-on variable,
record the varset of the procedure being analyzed.
compiler/det_analysis.m:
compiler/pd_util.m:
compiler/simplify_proc.m:
Supply the varset.
tests/invalid/require_det_in_lambda.err_exp:
tests/invalid/require_scopes.err_exp:
Expect the improved error messages.
5 lines
265 B
Plaintext
5 lines
265 B
Plaintext
require_det_in_lambda.m:017: Error: the required determinism of the goal in
|
|
require_det_in_lambda.m:017: this scope is `det', but its actual determinism
|
|
require_det_in_lambda.m:017: is `semidet'.
|
|
require_det_in_lambda.m:018: Call to `int.<'(in, in) can fail.
|