Files
mercury/tests/hard_coded/int_impl_imports.exp
Zoltan Somogyi 4b2a4a88b5 Fix handling "int used, imp imported" modules when making interface files.
This fixes the second incarnation of Mantis bug #401. (The first incarnation
was the handling of such modules when generating target code.)

compiler/grab_modules.m:
    Compute the set of modules that have a use_module declaration in the
    interface section and an import_module declaration in the implementation
    section, and set the status of the items imported from that module
    accordingly.

compiler/module_qual.id_set.m:
    If module A defines an entity (such as a type) that module B refers to
    without the required qualification (which can happen if B has a use_module,
    not import_module for A), then do NOT report A as unused in B; it IS used,
    just not properly.

tests/hard_coded/int_impl_imports.exp:
tests/hard_coded/int_impl_imports.m:
tests/hard_coded/int_impl_imports_2.m:
    A new test case to see whether we can compile a module that has
    "int used, imp imported" references to another module, and has
    unqualified references to an imported entity in the implementation.

tests/invalid/int_impl_imports.err_exp:
tests/invalid/int_impl_imports.m:
tests/invalid/int_impl_imports_2.m:
    A new test case to see whether we can generate the right error message
    for a module that has "int used, imp imported" references to another
    module, and has an unqualified references to an imported entity
    in the interface.

tests/hard_coded/Mmakefile:
tests/invalid/Mmakefile:
    Enable the two new test cases.

tests/valid_seq/int_impl_imports.m:
tests/valid_seq/int_impl_imports_2.m:
    Add vim mode lines.
2019-08-02 10:36:59 +02:00

2 lines
3 B
Plaintext