From 2095c78c92fbf92dad75787f356ef3cff350e800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B2=A0=5F=E0=B2=A0?= Date: Mon, 12 Dec 2022 10:33:23 +0100 Subject: [PATCH] add testcase --- tests/PHPStan/Analyser/NodeScopeResolverTest.php | 1 + tests/PHPStan/Analyser/data/bug-8442.php | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 tests/PHPStan/Analyser/data/bug-8442.php diff --git a/tests/PHPStan/Analyser/NodeScopeResolverTest.php b/tests/PHPStan/Analyser/NodeScopeResolverTest.php index e0a8eaa2ccb..8806119792f 100644 --- a/tests/PHPStan/Analyser/NodeScopeResolverTest.php +++ b/tests/PHPStan/Analyser/NodeScopeResolverTest.php @@ -1136,6 +1136,7 @@ public function dataFileAsserts(): iterable yield from $this->gatherAssertTypes(__DIR__ . '/data/imagick-pixel.php'); yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Arrays/data/bug-8467a.php'); yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-8467b.php'); + yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-8442.php'); } /** diff --git a/tests/PHPStan/Analyser/data/bug-8442.php b/tests/PHPStan/Analyser/data/bug-8442.php new file mode 100644 index 00000000000..a6dd50bad77 --- /dev/null +++ b/tests/PHPStan/Analyser/data/bug-8442.php @@ -0,0 +1,8 @@ +