Files
mercury/tests/valid/bug483.m
Zoltan Somogyi 4ccbefc241 Consider a module used if it defines a type_ctor in an inst defn.
compiler/unused_imports.m:
    As above. This fixes Mantis bug #483.

tests/valid/bug483.m:
    The test case for this bug.

tests/valid/Mercury.options:
tests/valid/Mmakefile:
    Enable the new test case with the right options.
2019-09-02 18:25:23 +10:00

19 lines
600 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
%
% With --warn-unused-imports, Versions of the compiler before 2019 sep 2
% used to emit a warning about the list module being imported but not used,
% even though it *is* used in the type constructor for the "empty" inst.
% To test whether we emit this warning, this program is compiled with
% --halt-at-warn.
%
:- module bug483.
:- interface.
:- import_module list.
:- inst empty for list/1
---> [].