diff --git a/tests/PHPStan/Analyser/AnalyserIntegrationTest.php b/tests/PHPStan/Analyser/AnalyserIntegrationTest.php index ebdf3a03e4..a4ee70e41f 100644 --- a/tests/PHPStan/Analyser/AnalyserIntegrationTest.php +++ b/tests/PHPStan/Analyser/AnalyserIntegrationTest.php @@ -981,6 +981,12 @@ public function testArrayUnion(): void $this->assertNoErrors($errors); } + public function testBug6948(): void + { + $errors = $this->runAnalyse(__DIR__ . '/data/bug-6948.php'); + $this->assertNoErrors($errors); + } + public function testBug7963(): void { $errors = $this->runAnalyse(__DIR__ . '/data/bug-7963.php'); diff --git a/tests/PHPStan/Analyser/data/bug-6948.php b/tests/PHPStan/Analyser/data/bug-6948.php new file mode 100644 index 0000000000..592f0af752 --- /dev/null +++ b/tests/PHPStan/Analyser/data/bug-6948.php @@ -0,0 +1,64 @@ +