Files
mercury/tests/invalid/state_vars_test2.m
Zoltan Somogyi 3dc4babb24 Update the style of more test cases.
And update expected output files for changes in line numbers.
2021-07-27 13:29:46 +10:00

24 lines
504 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module state_vars_test2.
:- interface.
:- pred p(int::in, int::out) is det.
:- implementation.
:- import_module int.
% Illegally refers to !:Y, which has not been explicitly introduced.
%
p(!X) :-
!:X = !.X +
( if max(0, !.X, !:Y) then
1
else
2
).