From 0dfd0d0101b86a0d7a9b7324618009a2b1a01933 Mon Sep 17 00:00:00 2001 From: Jean-Luc Herren Date: Sun, 11 Oct 2020 19:49:49 +0200 Subject: [PATCH] Add test for fixed bug #1014 Closes phpstan/phpstan#1014 --- .../PHPStan/Analyser/NodeScopeResolverTest.php | 6 ++++++ tests/PHPStan/Analyser/data/bug-1014.php | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tests/PHPStan/Analyser/data/bug-1014.php diff --git a/tests/PHPStan/Analyser/NodeScopeResolverTest.php b/tests/PHPStan/Analyser/NodeScopeResolverTest.php index 037d79fcbe..f5a7c22ac1 100644 --- a/tests/PHPStan/Analyser/NodeScopeResolverTest.php +++ b/tests/PHPStan/Analyser/NodeScopeResolverTest.php @@ -10131,6 +10131,11 @@ public function dataBug3866(): array return $this->gatherAssertTypes(__DIR__ . '/data/bug-3866.php'); } + public function dataBug1014(): array + { + return $this->gatherAssertTypes(__DIR__ . '/data/bug-1014.php'); + } + /** * @dataProvider dataBug2574 * @dataProvider dataBug2577 @@ -10205,6 +10210,7 @@ public function dataBug3866(): array * @dataProvider dataBug2611 * @dataProvider dataBug3548 * @dataProvider dataBug3866 + * @dataProvider dataBug1014 * @param string $assertType * @param string $file * @param mixed ...$args diff --git a/tests/PHPStan/Analyser/data/bug-1014.php b/tests/PHPStan/Analyser/data/bug-1014.php new file mode 100644 index 0000000000..27b8b48ffe --- /dev/null +++ b/tests/PHPStan/Analyser/data/bug-1014.php @@ -0,0 +1,18 @@ +