Pass $this/static type as receiver when checking reactivity of parent calls
[hiphop-php.git] / hphp / hack / test / typecheck / reactive / conditionally_reactive_parent1.php
blobd59e824b6e1d529d263f283bbae75a55aec2263e
1 <?hh
3 interface Rx {}
5 class A {
6 <<__Rx, __OnlyRxIfImpl(Rx::class)>>
7 public function f(): int {
8 return 1;
10 <<__Rx, __OnlyRxIfImpl(Rx::class)>>
11 public static function f1(): int {
12 return 1;
16 class B extends A implements Rx {
17 <<__Rx>>
18 public function g(): int {
19 // OK to call static and instance methods
20 return parent::f() + parent::f1();
22 <<__Rx>>
23 public static function g1(): int {
24 // OK
25 return parent::f1();