Files
mercury/tests/invalid/bug521.err_exp
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

14 lines
812 B
Plaintext

bug521.m:027: In clause for predicate `get_wrapped_things'/1:
bug521.m:027: in argument 1 of functor `list_wrapper/1':
bug521.m:027: type error in unification of argument
bug521.m:027: and constant `get_things'.
bug521.m:027: argument has type `list.list(bug521_sub.thing)',
bug521.m:027: constant `get_things' has type `list(bug521_sub.thing)'.
bug521_sub.int:006: Error: unqualified type `list' in automatically generated
bug521_sub.int:006: interface file. The problem is that the definition of
bug521_sub.int:006: this type is not visible in the source file of the
bug521_sub.int:006: `bug521_sub' module. The cause is probably either a typo
bug521_sub.int:006: in the type name, or a missing `:- import_module'
bug521_sub.int:006: declaration.
For more information, recompile with `-E'.