Files
mercury/tests/valid/empty_submodule.m
Zoltan Somogyi 56b636886a Avoid a compiler abort on empty submodules.
This fixes Mantis bug 437.

compiler/split_parse_tree_src.m:
    Add empty submodules to the submodules map, since the abort
    was caused absence of such an entry.

    Warn about the duplication if a submodule is later defined
    with the same name.

tests/valid/empty_submodule.m:
    Add this regression test for the bug.

tests/valid/Mmakefile:
    Enable the new test case.
2017-08-05 18:49:14 +02:00

21 lines
394 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ft=mercury ts=4 sw=4 et
%---------------------------------------------------------------------------%
:- module empty_submodule.
:- interface.
:- type t1
---> t1.
:- implementation.
:- module sub.
% :- interface.
%
% :- type t2
% ---> t2.
:- end_module sub.
:- end_module empty_submodule.