Files
mercury/tests/invalid/undef_symbol.m
Zoltan Somogyi 98a99090f5 Fix not-tested-for bugs from some invalid tests.
tests/invalid/undef_inst.m:
tests/invalid/undef_mode.m:
tests/invalid/undef_type.m:
    Besides the references to undefined insts, modes and types,
    these modules also lacked interface and implementation section markers.
    Add those markers.

tests/invalid/undef_inst.err_exp:
tests/invalid/undef_mode.err_exp:
tests/invalid/undef_type.err_exp:
    Do not expect the error messages for the missing markers.
    Continue to expect error messages about the undefined entities,
    but with updated line numbers.

tests/invalid/undef_symbol.m:
tests/invalid/undef_type_mod_qual.m:
    Fix programming style.
2021-07-01 00:18:37 +10:00

33 lines
651 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module undef_symbol.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
main(!IO) :-
p(!IO),
q(!IO),
undef_symbol.r(!IO).
:- pred p(io::di, io::uo) is det.
p(!IO) :-
string.append("hello ", "world.\n", Str),
io.write_string(Str, !IO).
:- pred q(io::di, io::uo) is det.
q(!IO) :-
Context = term.context("random", 17),
io.write_line(Context, !IO).
% :- pred r(io::di, io::uo) is det.