@@ -22,6 +22,7 @@ public function staticMethod()
22
22
public function doFoo ()
23
23
{
24
24
assertType ('array<static(StaticMethods\Foo)> ' , $ this ->method ());
25
+ assertType ('array<static(StaticMethods\Foo)> ' , $ this ->method ()[0 ]->method ());
25
26
assertType ('array<static(StaticMethods\Foo)> ' , self ::staticMethod ());
26
27
assertType ('array<static(StaticMethods\Foo)> ' , static ::staticMethod ());
27
28
}
@@ -34,6 +35,7 @@ class Bar extends Foo
34
35
public function doFoo ()
35
36
{
36
37
assertType ('array<static(StaticMethods\Bar)> ' , $ this ->method ());
38
+ assertType ('array<static(StaticMethods\Bar)> ' , $ this ->method ()[0 ]->method ());
37
39
assertType ('array<static(StaticMethods\Bar)> ' , self ::staticMethod ());
38
40
assertType ('array<static(StaticMethods\Bar)> ' , static ::staticMethod ());
39
41
}
@@ -43,6 +45,7 @@ public function doFoo()
43
45
function (Foo $ foo , Bar $ bar ) {
44
46
assertType ('array<StaticMethods\Foo> ' , $ foo ->method ());
45
47
assertType ('array<StaticMethods\Bar> ' , $ bar ->method ());
48
+ assertType ('array<StaticMethods\Bar> ' , $ bar ->method ()[0 ]->method ());
46
49
47
50
assertType ('array<StaticMethods\Foo> ' , Foo::staticMethod ());
48
51
assertType ('array<StaticMethods\Bar> ' , Bar::staticMethod ());
0 commit comments