Files
mercury/tests/warnings/duplicate_call.m
Zoltan Somogyi 6554ef7daa Replace "is" with "=".
Estimated hours taken: 2
Branches: main

Replace "is" with "=".
Add field names where relevant.
Replace integers with counters where relevant.
2003-05-26 09:01:46 +00:00

20 lines
381 B
Mathematica

% Test the warning for duplicate calls.
:- module duplicate_call.
:- interface.
:- pred dup_call(int::in, int::in, int::out) is det.
:- pred called(int::in, int::in, int::out) is det.
:- implementation.
:- import_module int.
dup_call(Int1, Int2, Int) :-
called(Int1, Int2, Int3),
called(Int1, Int2, Int4),
Int = Int3 + Int4.
called(Int1, Int2, Int) :-
Int = Int1 + Int2.