Make Hack type checker produce error when async method is not awaitable
[hiphop-php.git] / hphp / hack / test / find_refs / class.php
blobbc2e3c780cee530c2ebb3f5f5744b019b0d1222c
1 <?hh
3 abstract class Foo {
4 public Foo $prop = "aaa";
5 public static Foo $static_prop = "aaa";
6 const Foo CONST = "aaa";
7 abstract const Foo ABS_CONST;
8 const type type_const = Foo;
10 public function method(Generic<Foo> $x, $y) {
11 if ($y instanceof Foo) {
13 try {
14 } catch (Foo $foo) {
19 type Alias = Foo;
21 trait T {
22 require extends Foo; // TODO: this is not found
25 abstract class C extends Foo {}
27 function test<T as Foo>(
28 Foo $c
29 ): Foo {
30 return new Foo();