Make Hack type checker produce error when async method is not awaitable
[hiphop-php.git] / hphp / hack / test / find_refs / class_const.php
blob19b885edcbf854c6d9f9ab086b27717b19be3ebb
1 <?hh
3 class C {
4 const int foo = 3;
5 public static ?string $foo;
6 public static function foo() {}
8 public function test() {
9 self::foo;
10 $this::foo;
11 C::foo;
12 static::foo;
16 class D extends C {
17 public function test() {
18 self::foo;
19 $this::foo;
20 C::foo;
21 static::foo;
22 parent::foo;
26 type E = C;
27 newtype F = C;
29 function test(C $c, D $d, E $e, F $f) {
30 $c::foo;
31 $d::foo;
32 $e::foo;
33 $f::foo;
34 C::foo;
35 D::foo;
37 $c::$foo;
38 $c::foo();