Files
mercury/tests/invalid/bug257.err_exp
Zoltan Somogyi 502ea379e4 Make require_complete_switch [X] require a switch on X.
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.
2016-04-19 18:05:39 +10:00

3 lines
119 B
Plaintext

bug257.m:019: Error: the goal inside the require_complete_switch [Gee] scope is
bug257.m:019: not a switch on `Gee'.