diff --git a/src/Psalm/Type.php b/src/Psalm/Type.php index 6fc347c9f..1dbf72533 100644 --- a/src/Psalm/Type.php +++ b/src/Psalm/Type.php @@ -766,7 +766,9 @@ abstract class Type if (in_array( $string_type_token, - ['<', '>', '|', '?', ',', '{', '}', ':', '::', '[', ']', '(', ')', '&'], + [ + '<', '>', '|', '?', ',', '{', '}', ':', '::', '[', ']', '(', ')', '&', '=', '...' + ], true )) { continue; diff --git a/tests/TypeParseTest.php b/tests/TypeParseTest.php index 4a9060488..33df92542 100644 --- a/tests/TypeParseTest.php +++ b/tests/TypeParseTest.php @@ -11,7 +11,24 @@ class TypeParseTest extends TestCase */ public function setUp() { - //pae::setUp(); + $this->file_provider = new \Psalm\Tests\Internal\Provider\FakeFileProvider(); + + $config = new TestConfig(); + + $providers = new \Psalm\Internal\Provider\Providers( + $this->file_provider, + new \Psalm\Tests\Internal\Provider\FakeParserCacheProvider() + ); + + $this->project_analyzer = new \Psalm\Internal\Analyzer\ProjectAnalyzer( + $config, + $providers, + false, + true, + \Psalm\Internal\Analyzer\ProjectAnalyzer::TYPE_CONSOLE, + 1, + false + ); } /**