2 // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
5 public function foo():int { return 3; }
8 function test1():ConstVector
<(function(C
):int)> {
9 return ImmVector
{ $x ==> $x->foo() };
11 function test2():MutableVector
<(function(C
):int)> {
12 return Vector
{ $x ==> $x->foo() };
14 function test3():ConstMap
<int,(function(C
):int)> {
15 return ImmMap
{ 1 => $x ==> $x->foo() };
17 function test4():MutableMap
<int,(function(C
):int)> {
18 return Map
{ 1 => $x ==> $x->foo() };