Files
mercury/tests/invalid/field_syntax_error.err_exp
Zoltan Somogyi 8597feaae6 Improve two rarely-seen diagnostics.
compiler/parse_type_defn.m:
    As above.

tests/invalid/field_syntax_error.{m,err_exp}:
tests/invalid/types.{m,err_exp}:
    Add an instance of each bug the diagnostics are for,
    and test for the updated diagnostic text.
2026-02-15 23:45:25 +11:00

51 lines
3.5 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

field_syntax_error.m:020: In clause for function `baz1'/1:
field_syntax_error.m:020: warning: variable `Bar' occurs only once in this
field_syntax_error.m:020: scope.
field_syntax_error.m:020: In clause for function `baz1'/1:
field_syntax_error.m:020: in function result term of clause head:
field_syntax_error.m:020: error: invalid use of the field selection operator
field_syntax_error.m:020: (`^').
field_syntax_error.m:023: In clause for function `baz2'/1:
field_syntax_error.m:023: in function result term of clause head:
field_syntax_error.m:023: error: invalid use of the field selection operator
field_syntax_error.m:023: (`^').
field_syntax_error.m:026: In clause for function `baz3'/1:
field_syntax_error.m:026: warning: variable `Bar' occurs only once in this
field_syntax_error.m:026: scope.
field_syntax_error.m:026: In clause for function `baz3'/1:
field_syntax_error.m:026: in function result term of clause head:
field_syntax_error.m:026: error: invalid use of the field update operator
field_syntax_error.m:026: (`:=').
field_syntax_error.m:026: In clause for function `baz3'/1:
field_syntax_error.m:026: in function result term of clause head:
field_syntax_error.m:026: in argument 1 of functor `:=/2':
field_syntax_error.m:026: error: invalid use of the field selection operator
field_syntax_error.m:026: (`^').
field_syntax_error.m:029: In clause for function `baz4'/1:
field_syntax_error.m:029: in function result term of clause head:
field_syntax_error.m:029: error: invalid use of the field update operator
field_syntax_error.m:029: (`:=').
field_syntax_error.m:029: In clause for function `baz4'/1:
field_syntax_error.m:029: in function result term of clause head:
field_syntax_error.m:029: in argument 1 of functor `:=/2':
field_syntax_error.m:029: error: invalid use of the field selection operator
field_syntax_error.m:029: (`^').
field_syntax_error.m:034: In clause for function `baz5'/1:
field_syntax_error.m:034: warning: variable `Foo' occurs only once in this
field_syntax_error.m:034: scope.
field_syntax_error.m:034: (Did you mean `!.Foo' or `!:Foo'?)
field_syntax_error.m:034: In clause for function `baz5'/1:
field_syntax_error.m:034: in argument 1 of functor `f2/1':
field_syntax_error.m:034: error: invalid use of the `!' state variable
field_syntax_error.m:034: operator.
field_syntax_error.m:034: You probably meant to type `!.' or `!:' instead of
field_syntax_error.m:034: just `!'.
field_syntax_error.m:034: If you are trying to do a field update, then you
field_syntax_error.m:034: probably typed `=' where you meant to type `:='.
field_syntax_error.m:034: Warning: if the expression `!Foo ^ f2' is intended to
field_syntax_error.m:034: be part of a field update, then it should be
field_syntax_error.m:034: followed by `:=', not `='.
field_syntax_error.m:037: Error: expected a simple identifier as the field
field_syntax_error.m:037: name, got f(N).
For more information, recompile with `-E'.