Files
mercury/tests/invalid/mode_without_pred.err_exp
Zoltan Somogyi 66dee1e133 Fix a phasing problem in building the HLDS.
compiler/make_hlds_passes.m:
    Both fix and document the phasing problem.

compiler/add_pred.m:
    Document the field here as well.

compiler/check_field_access_functions.m:
    Delete the reference to this phasing problem.

tests/invalid/mode_without_pred.{m,err_exp}:
    A test case for this issue, which compilers from before this fix
    would have failed.

tests/invalid/Mmakefile:
    Enable the new test.
2025-07-14 17:01:34 +02:00

715 B

mode_without_pred.m:017: Error: `:- mode' declaration for function `f1'/1
mode_without_pred.m:017: without a corresponding `:- func' declaration.
mode_without_pred.m:017: Inferred :- func f1(mode_without_pred.t) = int.
mode_without_pred.m:017: In declaration of function `f1'/1:
mode_without_pred.m:017: error: a field access function for an exported field
mode_without_pred.m:017: must also be exported.
mode_without_pred.m:019: In declaration of function `f1 :='/2:
mode_without_pred.m:019: error: a field access function for an exported field
mode_without_pred.m:019: must also be exported.