Files
mercury/tests/invalid/bug363.err_exp
Zoltan Somogyi 74adbe508d Update ContextPieces in more places.
As we parse different parts of goals, the current ContextPieces is supposed
to describe the context of the current syntactic construct, for use in
generating error messages if and when that construct cannot be parsed.

The ContextPieces weren't being updated in all the places where they should
be updated, partly because of the cost. Switch to representing ContextPieces
as cords, not lists, of format components. In most cases, adding a new piece
of context should now require allocating just two cells on the heap: putting
a cord wrapper around a statically allocated list, and a cord internal node
adding this cord after the previous context.

compiler/prog_io_dcg.m:
compiler/prog_io_goal.m:
    Make the change described above.

    Update the policy on *when* ContextPieces should be updated.

    In prog_io_goal.m, remove a redundant computation of Context (NOT
    ContextPieces).

compiler/prog_io_item.m:
compiler/prog_io_pragma.m:
compiler/prog_io_typeclass.m:
    Make the change described above.

    Pass meaningful ContextPieces in more places.

    In prog_io_pragma.m, switch to using the standard phases we usually
    use for ContextPieces.

compiler/prog_io_mode_defn.m:
compiler/prog_io_mutable.m:
compiler/prog_io_sym_name.m:
compiler/prog_io_type_defn.m:
compiler/prog_io_util.m:
compiler/superhomogeneous.m:
    Conform to changes the above.

tests/invalid/bug363.err_exp:
tests/invalid/some.err_exp:
    Expect the updated error messages.
2015-11-26 07:35:39 +11:00

8 lines
451 B
Plaintext

bug363.m:014: In the third argument of `:- pragma foreign_proc' declaration:
bug363.m:014: error: the second element of the attribute list,
bug363.m:014: `(promise_pure thread_safe)', is not a valid foreign_proc
bug363.m:014: attribute.
bug363.m:015: In the third argument of `:- pragma foreign_proc' declaration:
bug363.m:015: error: the fifth element of the attribute list, `bad_attr', is
bug363.m:015: not a valid foreign_proc attribute.