mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-18 10:53:40 +00:00
We used to generate diagnostics of the form
The predicate symbol predicate `<'/2 is also overloaded here.
The second "predicate" is pure noise. It could never be "function",
even though the code generating that message was prepared for that.
compiler/typecheck.m:
When typechecking a *predicate* call, don't specify the predicate
being called using a data structure that can also refer to functions.
compiler/typecheck_info.m:
When representing an overloaded predicate name, as opposed to
an overloaded function name, don't include a pred_or_func indication
that should *always* be pf_predicate.
compiler/typecheck_errors.m:
When reporting an overloaded predicate name, or talking about a
predicate's argument vector, do not take a pred_or_func indication,
since it should *always* be pf_predicate.
tests/invalid/ambiguous_overloading_error.err_exp:
tests/warnings/ambiguous_overloading.exp:
Don't expect the redundant "predicate" in the overload error message.
tests/invalid/max_error_line_width.err_exp:
tests/invalid/max_error_line_width.m:
The deletion of the redundant "predicate" in overload error messages
made them all fit on one line, robbing this test of its task of testing
longer-than-80-column output lines. Change the test so that the overload
is not between int.< and float.<, but between the unchecked_left_shift
functions in int and uint, since the longer function name yields error
message lines in the length range this test case wants to test.
tests/invalid/ambiguous_overloading_error.m:
tests/invalid/arg_permutation.m:
tests/invalid/assert_in_interface.m:
tests/invalid/bad_detism_category.m:
Fix programming style.
tests/invalid/assert_in_interface.err_exp:
Update a line number.
16 lines
436 B
Mathematica
16 lines
436 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% Assertion in the interface refers to a predicate which is imported
|
|
% in the implementation section of the module.
|
|
%
|
|
|
|
:- module assert_in_interface.
|
|
:- interface.
|
|
|
|
:- promise all [X, Y] list.last(X, Y).
|
|
|
|
:- implementation.
|
|
:- import_module list.
|