Files
mercury/tests/invalid/bug521.m
Zoltan Somogyi 7583d27f21 Warn about missing information in .int files.
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.
2020-10-08 16:04:02 +11:00

28 lines
640 B
Mathematica

%-----------------------------------------------------------------------------%
% vim: ft=mercury ff=unix ts=4 sw=4 et
%-----------------------------------------------------------------------------%
:- module bug521.
:- interface.
:- import_module bug521_sub.
:- import_module list.
:- import_module io.
:- pred main(io::di, io::uo) is det.
:- type list_wrapper(C)
---> list_wrapper(list(C)).
:- pred get_wrapped_things(list_wrapper(thing)::out) is det.
%-----------------------------------------------------------------------------%
:- implementation.
main(!IO).
get_wrapped_things(X) :-
X = list_wrapper(get_things).