Support is and as
[hiphop-php.git] / hphp / hack / test / decl / sound_dynamic_call_meth_1.bad.php
blob0c590985c1f356e51ee0231beb50ced873460c4f
1 <?hh
2 // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
4 class A<T> {}
6 class C {
7 <<__SupportDynamicType>>
8 public function expect_A_int(A<int> $a1, A<int> $a2) : void {}
12 // handling of Sound Dynamic Callable methods defined in other classes
13 // is not complete; this should ideally be accepted, but it is not
14 <<__SupportDynamicType>>
15 class Foo {
16 public function foo(A<int> $a) : void {
17 (new C())->expect_A_int($a, new A<int>());
19 public function bar(A<int> $a) : void {
20 (new C())->expect_A_int(new A<int>(), $a);