Files
mercury/tests/valid/unescaped_special_char.m
Julien Fischer e5f087a07e Rename a test case.
tests/valid/int64.m:
    Rename this test case to unescaped_special_char since its current name
    conflicts with an upcoming standard library addition.  The new name
    is more descriptive anyway.

    Rename the type int64/0 defined in this test since an upcoming change
    will make that type a builtin (and hence a reserved name).

tests/valid/Mmakefile:
    Conform to the above change.
2018-01-11 23:09:08 -05:00

30 lines
726 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
%
% A development version of the Mercury compiler generated invalid C code
% for this example, because it didn't properly escape special characters
% such as \ in some of the C strings that it generated.
:- module unescaped_special_char.
:- interface.
:- type myint64.
:- func myint64 /\ myint64 = myint64.
:- implementation.
:- type myint64 == int.
:- pragma foreign_proc("C",
(A::in) /\ (B::in) = (C::out),
[promise_pure, will_not_call_mercury],
"
C = A & B;
").
% implementation for the other backends.
A /\ _B = A.