mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 03:43:51 +00:00
compiler/module_qual.qual_errors.m:
When generating the context for an error message of the form
"In definition of type/inst/mode/pred/func X:", if the X is guaranteed
to be defined in the current module, then print its name unqualified.
Since the module qualifier is guaranteed to be the same as the name
of the module being compiled, its presence in the error message
adds no information and is therefore only clutter.
tests/invalid/errors.err_exp:
tests/invalid/errors1.err_exp:
tests/invalid/int_impl_imports.err_exp:
tests/invalid/kind.err_exp:
tests/invalid/test_nested.err_exp:
tests/invalid/type_arity.err_exp:
tests/invalid/undef_type.err_exp:
tests/invalid_make_int/missing_interface_import.int_err_exp:
tests/invalid_make_int/missing_interface_import.int_err_exp2:
Expect the updated error message.
tests/invalid_make_int/missing_interface_import.m:
Fix a comment.
26 lines
678 B
Mathematica
26 lines
678 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% Regression test: the Mercury compiler of Mon Mar 2, 1998 failed to report
|
|
% an error for this test case. The .int_err_exp2 file is for --use-subdirs.
|
|
|
|
:- module missing_interface_import.
|
|
:- interface.
|
|
|
|
:- type bar == map(int, int).
|
|
|
|
:- pred p(univ__univ::in) is det.
|
|
:- pred q(list(int)::in) is det.
|
|
|
|
:- implementation.
|
|
|
|
% These import_module and use_module declarations should be in the
|
|
% interface section.
|
|
:- import_module list.
|
|
:- import_module map.
|
|
:- use_module univ.
|
|
|
|
p(_).
|
|
q(_).
|