There was an error while loading. Please reload this page.
1 parent 0b29958 commit 0b642dfCopy full SHA for 0b642df
tests/PHPStan/Rules/DeadCode/UnreachableStatementRuleTest.php
@@ -252,6 +252,18 @@ public function testMultipleUnreachable(): void
252
]);
253
}
254
255
+#[RequiresPhp('>= 8.1')]
256
+public function testBug11909(): void
257
+{
258
+$this->treatPhpDocTypesAsCertain = false;
259
+$this->analyse([__DIR__ . '/data/bug-11909.php'], [
260
+[
261
+'Unreachable statement - code above always terminates.',
262
+10,
263
+],
264
+]);
265
+}
266
+
267
#[RequiresPhp('>= 8.1')]
268
public function testBug13232a(): void
269
{
tests/PHPStan/Rules/DeadCode/data/bug-11909.php
@@ -0,0 +1,10 @@
1
+<?php declare(strict_types = 1);
2
3
+namespace Bug11909;
4
5
+function doFoo(): never {
6
+throw new LogicException("throws");
7
8
9
+echo doFoo();
10
+echo "hello";
0 commit comments