Files
mercury/tests/invalid/mode_decl_in_wrong_section.err_exp
Zoltan Somogyi 24ec389860 Improve diagnostics about missing ::mode annotations.
compiler/add_clause.m:
    When a mode-specific clause is missing a ::mode annotation from some
    arguments, print the identities of those arguments.

compiler/add_pred.m:
    Improve the wording of a diagnostic.

tests/invalid/mode_decl_in_wrong_section.err_exp:
tests/invalid/multimode_dcg.err_exp:
tests/invalid/multimode_dcg.m:
tests/invalid/multimode_syntax.err_exp:
    Expect updated diagnostics.
2024-05-30 22:19:22 +10:00

1.8 KiB

mode_decl_in_wrong_section.m:013: Warning: the first mode declaration for
mode_decl_in_wrong_section.m:013: predicate `p'/2 is not followed immediately
mode_decl_in_wrong_section.m:013: by its second mode declaration.
mode_decl_in_wrong_section.m:021: The second mode declaration is here.
mode_decl_in_wrong_section.m:015: Error: mode declaration in the interface
mode_decl_in_wrong_section.m:015: section for function `f'/1. It should be in
mode_decl_in_wrong_section.m:015: the implementation section, because the
mode_decl_in_wrong_section.m:015: corresponding `:- func' declaration is
mode_decl_in_wrong_section.m:015: there.
mode_decl_in_wrong_section.m:015: Warning: the first mode declaration for
mode_decl_in_wrong_section.m:015: function `f'/1 is not followed immediately
mode_decl_in_wrong_section.m:015: by its second mode declaration.
mode_decl_in_wrong_section.m:024: The second mode declaration is here.
mode_decl_in_wrong_section.m:021: Error: mode declaration in the implementation
mode_decl_in_wrong_section.m:021: section for predicate `p'/2. It should be
mode_decl_in_wrong_section.m:021: in the interface section, because the
mode_decl_in_wrong_section.m:021: corresponding `:- pred' declaration is
mode_decl_in_wrong_section.m:021: there.
mode_decl_in_wrong_section.m:023: Warning: the function declaration for
mode_decl_in_wrong_section.m:023: function `f'/1 is not followed immediately
mode_decl_in_wrong_section.m:023: by its first mode declaration.
mode_decl_in_wrong_section.m:015: The first mode declaration is here.