Skip to content

Commit 71071d4

Browse files
committed
add failing test
1 parent 1f150cc commit 71071d4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace Bug13272Property;
4+
5+
use function PHPStan\Testing\assertType;
6+
7+
function foo(object $bar): void
8+
{
9+
foreach (['qux', 'quux'] as $property) {
10+
if (!property_exists($bar, $property)) {
11+
throw new \Exception;
12+
}
13+
14+
assertType("object&hasProperty(quux)&hasProperty(qux)", $bar);
15+
}
16+
}

0 commit comments

Comments
 (0)