mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-25 06:14:18 +00:00
tests/invalid/multiply_star.err_exp3:
Add a file for the expected error message in debug grades.
tests/invalid/multiply_star.m:
Add a description of the reason for the difference in expected
error messages in debug grades.
tests/invalid/Mercury.options:
Specify verbose errors, which affects the .err_exp2 file.
tests/invalid/multiply_star.err_exp:
tests/invalid/multiply_star.err_exp2:
Update the line numbers in the error messages.
33 lines
987 B
Mathematica
33 lines
987 B
Mathematica
%---------------------------------------------------------------------------%
|
|
% vim: ts=4 sw=4 et ft=mercury
|
|
%---------------------------------------------------------------------------%
|
|
%
|
|
% The .err_exp file is for non-debug grades without --intermod-opt.
|
|
% The .err_exp2 file is for all grades with --intermod-opt.
|
|
% The .err_exp3 file is for debug grades without --intermod-opt.
|
|
%
|
|
% The presence of --intermod-opt yields a kind of error message
|
|
% which makes the presence or absence of debugging irrelevant.
|
|
% However, without --intermod-opt, debug grades affect the error message
|
|
% by causing the implicit import of table_builtin.m (for I/O tabling),
|
|
% which causes the implicit import of io.m, which causes the implicit import
|
|
% of string.m.
|
|
%
|
|
|
|
:- module multiply_star.
|
|
|
|
:- interface.
|
|
|
|
:- pred p(int::in, int::out) is det.
|
|
|
|
:- implementation.
|
|
|
|
% :- import_module int. % This import is missing.
|
|
|
|
p(A, Z) :-
|
|
( if A = 0 then
|
|
Z = 1
|
|
else
|
|
Z = A * 2
|
|
).
|