blob: 5700bc9a71ef70592faba216a722f5db1324be13 (
plain) (
blame)
1
2
3
4
5
6
|
$callbackType = Callable<(Int32)->Int32>;
$defaultFunc = Callable($callbackType, ($x)->($x));
$outerType = CallableType(1, Int32, Int32, Optional<$callbackType>);
$outer = Callable($outerType, ($x,$f)->(($f ?? $defaultFunc)($x)));
select $outer(1,($y)->($y+1)), $outer(1);
|