Skip to content

Commit a45d440

Browse files
phpstan-botclaude
andcommitted
Move bug-14324 test from nsrt to AnalyserIntegrationTest
The original problem was an internal error/crash, so the regression test belongs in AnalyserIntegrationTest rather than as an nsrt type inference test. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 414879c commit a45d440

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

tests/PHPStan/Analyser/AnalyserIntegrationTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,13 @@ public function testBigPhpdocArrayShape(): void
14921492
$this->assertNoErrors($errors);
14931493
}
14941494

1495+
public function testBug14324(): void
1496+
{
1497+
// crash
1498+
$errors = $this->runAnalyse(__DIR__ . '/data/bug-14324.php');
1499+
$this->assertNoErrors($errors);
1500+
}
1501+
14951502
/**
14961503
* @param string[]|null $allAnalysedFiles
14971504
* @return list<Error>
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Bug14324;
44

5-
use function PHPStan\Testing\assertType;
6-
75
final class Test
86
{
97
private const ADDITIONAL_MAPS = [
@@ -55,8 +53,6 @@ public function createMap(): void
5553
// added with 3 entries, breaching the closure limit of 32 entries
5654
self::$map[$map] = fn () => self::$map['foo']();
5755
}
58-
59-
assertType("non-empty-array<'bar'|'bar-'|'bar1'|'bar2'|'baz'|'baz-'|'baz1'|'baz2'|'corge'|'corge1'|'foo'|'foo-'|'foo1'|'foo2'|'fred'|'fred1'|'garply'|'garply1'|'grault'|'grault1'|'plugh'|'plugh1'|'quux'|'quux1'|'qux'|'qux1'|'thud'|'thud1'|'waldo'|'waldo1'|'xyzzy'|'xyzzy1', callable(): mixed>&oversized-array", self::$map);
6056
}
6157
}
6258
}

0 commit comments

Comments
 (0)