diff --git a/tests/PHPStan/Analyser/NodeScopeResolverTest.php b/tests/PHPStan/Analyser/NodeScopeResolverTest.php index 519c123bed..3958e2d8d8 100644 --- a/tests/PHPStan/Analyser/NodeScopeResolverTest.php +++ b/tests/PHPStan/Analyser/NodeScopeResolverTest.php @@ -1034,6 +1034,7 @@ public function dataFileAsserts(): iterable yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Arrays/data/bug-7469.php'); yield from $this->gatherAssertTypes(__DIR__ . '/../Rules/Variables/data/bug-3391.php'); yield from $this->gatherAssertTypes(__DIR__ . '/data/bug-6901.php'); + yield from $this->gatherAssertTypes(__DIR__ . '/data/var-in-and-out-of-function.php'); if (PHP_VERSION_ID >= 70400) { yield from $this->gatherAssertTypes(__DIR__ . '/data/arrow-function-argument-type.php'); diff --git a/tests/PHPStan/Analyser/data/var-in-and-out-of-function.php b/tests/PHPStan/Analyser/data/var-in-and-out-of-function.php new file mode 100644 index 0000000000..6550d139b7 --- /dev/null +++ b/tests/PHPStan/Analyser/data/var-in-and-out-of-function.php @@ -0,0 +1,25 @@ +