mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 21:33:49 +00:00
compiler/parse_pragma.m:
Instead of reporting that a pragma in a file has the "wrong number of
arguments", explicitly say what the *right* number of arguments are.
Fix a missing colon.
Make a message conform to our 'expected X, got Y' pattern.
Future proof some code against future changes that may make ContextPieces
empty.
tests/invalid/bad_foreign_export_enum.err_exp:
tests/invalid/bad_foreign_import_module.err_exp:
tests/invalid/bad_foreign_type.err_exp:
tests/invalid/require_tailrec_invalid.err_exp:
Update the expected outputs of these tests for the changes above..
24 lines
1.4 KiB
Plaintext
24 lines
1.4 KiB
Plaintext
bad_foreign_export_enum.m:017: Error: a `:- pragma foreign_export_enum'
|
|
bad_foreign_export_enum.m:017: declaration must have two, three or four
|
|
bad_foreign_export_enum.m:017: arguments.
|
|
bad_foreign_export_enum.m:021: In first argument of
|
|
bad_foreign_export_enum.m:021: `:- pragma foreign_export_enum' declaration:
|
|
bad_foreign_export_enum.m:021: error: invalid foreign language
|
|
bad_foreign_export_enum.m:021: `"InvalidLanguage"'.
|
|
bad_foreign_export_enum.m:025: In second argument of
|
|
bad_foreign_export_enum.m:025: `:- pragma foreign_export_enum' declaration:
|
|
bad_foreign_export_enum.m:025: error: expected name/arity for type, got
|
|
bad_foreign_export_enum.m:025: `fruit'.
|
|
bad_foreign_export_enum.m:028: In first argument of
|
|
bad_foreign_export_enum.m:028: `:- pragma foreign_export_enum' declaration:
|
|
bad_foreign_export_enum.m:028: error: invalid foreign language
|
|
bad_foreign_export_enum.m:028: `"InvalidLanguage"'.
|
|
bad_foreign_export_enum.m:029: In second argument of
|
|
bad_foreign_export_enum.m:029: `:- pragma foreign_export_enum' declaration:
|
|
bad_foreign_export_enum.m:029: error: expected name/arity for type, got
|
|
bad_foreign_export_enum.m:029: `fruit'.
|
|
bad_foreign_export_enum.m:030: Error: malformed attributes list in
|
|
bad_foreign_export_enum.m:030: `:- pragma foreign_export_enum' declaration.
|
|
bad_foreign_export_enum.m:031: Error: expected list of mapping elements, not
|
|
bad_foreign_export_enum.m:031: `5678'.
|