Files
mercury/tests/invalid_make_int/missing_parent_import.m
Zoltan Somogyi f15a2b5f2a Rename X's aux modules as X_helper_N in invalid_make_int.
tests/invalid/*.m:
    Rename modules as mentioned above.

    Update all references to the moved modules.

tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
    Update all references to the moved modules.
2023-06-18 12:51:04 +02:00

43 lines
1.4 KiB
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
%
% A test case to test the error messages that occur if you omit an
% `import_module' declaration for a parent module, in particular in the case
% where the parent module still gets imported indirectly via another module.
% This is a regression test -- we used to issue a quite misleading
% error message for this test case.
%
:- module missing_parent_import.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- implementation.
%---------------------------------------------------------------------------%
:- import_module missing_parent_import_helper_2.
% The ommission of the following import is the bug that this
% test case is testing.
% :- import_module missing_parent_import_helper_1.
:- import_module missing_parent_import_helper_1.child.
:- use_module missing_parent_import_helper_1.child2.
:- import_module std_util.
:- import_module require.
main(!IO) :-
missing_parent_import_helper_1.child.hello(!IO),
child.hello(!IO),
hello(!IO),
missing_parent_import_helper_1.child2.hello(!IO),
missing_parent_import_helper_2.hello(!IO).
%---------------------------------------------------------------------------%
:- end_module missing_parent_import.
%---------------------------------------------------------------------------%