Files
mercury/tests/invalid/multiply_star.m
Peter Wang 150cf5233c Fix test failures with intermodule optimisation.
tests/invalid/Mmakefile:
    Add type_error_use_module to list of REDIRECT_OPT_ERROR_MODULES
    as it produces error messages while making the .opt file.

tests/invalid/multiply_star.m:
    Add description of .err_exp files.

tests/invalid/multiply_star.err_exp:
    Update line numbers.

tests/invalid/multiply_star.err_exp2:
    Add expected error output when compiling with intermodule
    optimisation.
2021-05-05 12:24:03 +10:00

24 lines
568 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
%
% The .exp file file is for compiling without intermodule optimization.
% The .err_exp2 file is for compiling with intermodule optimization.
:- 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
).