mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 20:03:44 +00:00
compiler/add_pred.m:
When recording the declaration of a predicate or function that is
imported from another module, report an error for any types in the
argument list that were not module qualified when the .int file
was constructed.
Eventually, once the cleanup of our system of managing interface files
is done, we can switch to preventing the generation of .int files
with missing information. The above change should help until then.
tests/invalid/bug521.m:
tests/invalid/bug521_sub.m:
tests/invalid/bug521.err_exp:
A new test case for the new error message.
tests/invalid_make_int/bug521_sub.m:
tests/invalid_make_int/bug521_sub.int_err_exp:
tests/invalid_make_int/Mercury.options:
A new test case for how we would diagnose the same problem
at interface-generation time.
tests/invalid/Mmakefile:
tests/invalid_make_int/Mmakefile:
Enable the new test cases.
21 lines
530 B
Mathematica
21 lines
530 B
Mathematica
%-----------------------------------------------------------------------------%
|
|
% vim: ft=mercury ff=unix ts=4 sw=4 et
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
:- module bug521_sub.
|
|
:- interface.
|
|
|
|
% :- import_module list. % Missing module import causes the error
|
|
|
|
:- type thing
|
|
---> thing_a
|
|
; thing_b.
|
|
|
|
:- func get_things = list(thing).
|
|
|
|
%-----------------------------------------------------------------------------%
|
|
|
|
:- implementation.
|
|
|
|
get_things = [thing_a, thing_b].
|