Fix bug in hack codegen for sets
[hiphop-php.git] / hphp / hack / test / typecheck / lambda / lambda_tany.php
blob7ed489c6daff623204d163f3961c15ed01f4df3c
1 <?hh
2 // Copyright 2004-present Facebook. All Rights Reserved.
4 class B {
5 public function foo(): void {}
7 class C extends B {
8 public function foo(): void {}
11 function test_tany(/* TAny */ $y): void {
12 $f = $x ==> $x->foo();
13 $f($y);
14 $f(new C());
17 function break_it(): void {
18 test_tany(new B());