Skip to content

Commit d267e51

Browse files
committed
Test object shape property type from intersection with universal object crate
1 parent e21fbbd commit d267e51

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: tests/PHPStan/Analyser/data/object-shape.php

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ public function testGenerics()
5454
{
5555
$o = (object) ['foo' => 1, 'bar' => new \Exception()];
5656
assertType('object{foo: 1, bar: Exception}&stdClass', $o);
57+
assertType('1', $o->foo);
58+
assertType('Exception', $o->bar);
5759

5860
assertType('Exception', $this->generics($o));
5961
}

0 commit comments

Comments
 (0)