Files
mercury/tests/valid/ambig_functor.m
Zoltan Somogyi c03b11ca48 Update the style of more test cases.
And updated expected outputs for changed line numbers.
2021-07-27 19:29:21 +10:00

41 lines
694 B
Mathematica

%---------------------------------------------------------------------------%
% vim: ts=4 sw=4 et ft=mercury
%---------------------------------------------------------------------------%
:- module ambig_functor.
:- interface.
:- import_module io.
:- type a
---> foo(int, string)
; bar.
:- type b
---> foo(string, int)
; bar.
:- type c(T)
---> foo(T, T)
; bar.
:- pred main(io::di, io::uo) is det.
:- pred ambig(T::in) is semidet.
:- implementation.
main(!IO) :-
( if ambig(foo(3, "string")) then
true
else
true
).
ambig(A1) :-
A1 = foo(3, _),
A1 = foo(_, "string").
:- end_module ambig_functor.