Files
mercury/tests/invalid
Zoltan Somogyi 20b77c995e Fix if-then-else contexts in DCG clauses.
compiler/parse_dcg_goal.m:
    The DCG transformation adds unifications to the then-parts and else-parts
    of if-then-elses. Use the contexts of the actual user code in these parts
    for the compiler-generated conjunctions of which they are part.

tests/invalid/dcg_context.{m,err_exp}:
    The test case from m-users which motivated this change. The error message
    generated by the compiler for this code used the same context for
    both the user-written then-part and the compiler-created else part
    of an if-then (no else) goal in a DCG clause. The fix makes it clear,
    in this instance and most others, that when mode analysis complains
    about a mismatch between the two arms of the if-then-else, it is
    talking about two separate pieces of code.

tests/invalid/Mmakefile:
    Enable the new test case.
2023-11-03 23:51:34 +11:00
..
2023-10-24 16:27:11 +11:00
2020-11-06 00:49:21 +11:00
2020-10-27 23:11:11 +11:00
2020-10-27 23:11:11 +11:00
2021-07-27 13:29:46 +10:00
2021-07-27 13:29:46 +10:00
2021-07-27 13:29:46 +10:00
2020-10-27 23:11:11 +11:00
2020-10-27 11:10:11 +11:00
2020-10-27 23:11:11 +11:00