mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 10:53:40 +00:00
compiler/det_report.m:
In some cases described in the new test case, the error message
we print for a missing switch inside an arm of a larger switch
is misleading unless we print *which* arm of the larger switch
we are complaining about, so print that information.
tests/invalid/require_complete_nested_switch.{m,err_exp}:
A test case derived from the real-life error that motivated this diff.
tests/invalid/Mmakefile:
Enable the new test case.
7 lines
421 B
Plaintext
7 lines
421 B
Plaintext
require_complete_nested_switch.m:094: Warning: this disjunct will never have
|
|
require_complete_nested_switch.m:094: any solutions.
|
|
require_complete_nested_switch.m:096: Inside the case "k" of the switch on Str:
|
|
require_complete_nested_switch.m:096: error: the goal inside the
|
|
require_complete_nested_switch.m:096: require_complete_switch [Str] scope is
|
|
require_complete_nested_switch.m:096: not a switch on `Str'.
|