Skip to content

Commit c21c52c

Browse files
committed
more tests
1 parent 386f1db commit c21c52c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/PHPStan/Rules/DeadCode/data/bug-13232c.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ public function sayNullsafeHello(?self $x): void
2828
echo 'this might happen, in case $x is null';
2929
}
3030

31+
public function sayMaybeHello(): void
32+
{
33+
if (rand(0, 1)) {
34+
echo 'Hello, ' . $this->mightReturnNever()
35+
. ' no way';
36+
}
37+
38+
echo 'this might happen';
39+
}
40+
3141
function mightReturnNever(): never
3242

3343
{

0 commit comments

Comments
 (0)