Files
mercury/tests/invalid/bad_include.m
Zoltan Somogyi 91be6830c2 Add a test case for bad :- include_module items.
compiler/prog_item.m:
    Clarify the documentation of include_module items.

tests/invalid/bad_include.{m,err_exp}:
    A new test case to test diagnostics for different kinds of invalid
    include_module items.

tests/invalid/Mmakefile:
    Enable the new test case.
2019-03-28 11:32:13 +11:00

30 lines
916 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ft=mercury ts=4 sw=4 et
%---------------------------------------------------------------------------%
:- module bad_include.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
%---------------------------------------------------------------------------%
%---------------------------------------------------------------------------%
:- implementation.
:- include_module 42.
:- include_module f([1, 2, 3]).
:- include_module bad_include.sub1.sub2.
:- include_module other_module.sub3.
%---------------------------------------------------------------------------%
main(!IO) :-
io.write_string("hello, world\n", !IO).
%---------------------------------------------------------------------------%
:- end_module bad_include.
%---------------------------------------------------------------------------%