Files
mercury/tests/valid/int_imp_test_2.m
Zoltan Somogyi effb79f3ee Delete an overstrong sanity check.
compiler/comp_unit_interface.m:
    As above.

tests/valid/int_imp_test.m:
tests/valid/int_imp_test_2.m:
    A regression test for the abort that the sanity check caused.

tests/valid/Mmakefile:
    Enable the new test case.
2020-09-27 16:49:14 +10:00

33 lines
813 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ft=mercury ts=4 sw=4 et
%---------------------------------------------------------------------------%
%
% Running "mmc --make-interface" on this module used to result in a
% compiler abort. This was because
%
% - due to the abstract-exported type depending on bool, the compiler
% deciced that the import of the bool module in the implementation section
% was needed, but
%
% - the module bool was imported in the interface as well.
%
% The abort was caused by an overzealous sanity check that insisted
% on the absence of any such duplication.
%
:- module int_imp_test_2.
:- interface.
:- import_module bool.
:- type t1
---> f1(bool).
:- type t2.
:- implementation.
:- import_module bool.
:- type t2 == bool.