compiler/det_report.m:
Generate an error message if a require_complete_switch [X] scope
is wrapped around a goal that is not a switch on X.
doc/reference_manual.texi:
Update the reference manual to document this change. Also fix an
old documentation problem: require_complete_switch scopes do NOT
require covering all the function symbols in the type of the
switch-on variable if the switched-on variable's inst says that
it cannot be bound to some of them.
compiler/hlds_goal.m:
Update the comment on the require_complete_switch scope
in the same way.
NEWS:
Announce the change.
tests/warnings/bug257.{m,exp}:
tests/invalid/bug257.{m,err_exp}:
tests/warnings/Mmakefile:
tests/invalid/Mmakefile:
For the bug257.m test case, which has a require_complete_switch [X] scope
around a goal that is not a switch on X, expect the error message
we now generate, not the old warning.
Since the compilation of bug257.m now fails, move it from warnings
to invalid.
tests/valid/Mmakefile:
Disable the bug257b.m test case, which also had a
require_complete_switch [X] scope around a goal that was not a switch on X.
tests/valid/bug257b.m:
Document that this test case is now disabled, and why.
tests/invalid/*.{m,err_exp}:
tests/misc_tests/*.m:
tests/mmc_make/*.m:
tests/par_conj/*.m:
tests/purity/*.m:
tests/stm/*.m:
tests/string_format/*.m:
tests/structure_reuse/*.m:
tests/submodules/*.m:
tests/tabling/*.m:
tests/term/*.m:
tests/trailing/*.m:
tests/typeclasses/*.m:
tests/valid/*.m:
tests/warnings/*.{m,exp}:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the tests
that check compiler error messages, expect the new line numbers.
browser/cterm.m:
browser/tree234_cc.m:
Import only one module per line.
tests/hard_coded/boyer.m:
Fix something I missed.
Emit a warning if the variable that is the subject of a require_complete_switch
scope does not occur in the sub-goal.
compiler/det_report.m:
As above.
tests/valid/Mmakefile:
tests/valid/bug257b.{m,exp}:
tests/warnings/Mmakefile:
tests/warnings/bug257.{m,exp}:
Test cases for the above.