mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-22 04:43:53 +00:00
Estimated hours taken: 0.25 tests/valid/Mmake: tests/valid/higher_order_implied_mode.m: Regression test for bug in modecheck_call.m with handling of implied modes of higher-order calls.
13 lines
254 B
Mathematica
13 lines
254 B
Mathematica
:- module higher_order_implied_mode.
|
|
:- interface.
|
|
:- pred p is semidet.
|
|
:- implementation.
|
|
p :- (X = 1 ; X = 2), r(q(X)).
|
|
|
|
:- pred q(int::in, int::out) is det.
|
|
q(X, X).
|
|
|
|
:- pred r(pred(int)).
|
|
:- mode r(pred(out) is det) is semidet.
|
|
r(P) :- call(P, 42).
|