diff --git a/tests/PHPStan/Analyser/AnalyserIntegrationTest.php b/tests/PHPStan/Analyser/AnalyserIntegrationTest.php index 9020c4b3c4a..fe77dffff34 100644 --- a/tests/PHPStan/Analyser/AnalyserIntegrationTest.php +++ b/tests/PHPStan/Analyser/AnalyserIntegrationTest.php @@ -1506,6 +1506,13 @@ public function testBug13801(): void $this->assertNoErrors($errors); } + public function testBug8835(): void + { + // endless loop crash + $errors = $this->runAnalyse(__DIR__ . '/data/bug-8835.php'); + $this->assertNoErrors($errors); + } + /** * @param string[]|null $allAnalysedFiles * @return list diff --git a/tests/PHPStan/Analyser/data/bug-8835.php b/tests/PHPStan/Analyser/data/bug-8835.php new file mode 100644 index 00000000000..9495430971d --- /dev/null +++ b/tests/PHPStan/Analyser/data/bug-8835.php @@ -0,0 +1,16 @@ + */ +class B implements I +{ + const X = 'x'; +}