mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
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.
19 lines
600 B
Mathematica
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
|
|
---> [].
|