From 84459286ace296f57af0b9a346dff847d6d2d42a Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Tue, 4 Sep 2018 22:27:55 -0400 Subject: [PATCH] Fix #973 - allow types to reference other new types in a given docblock --- src/Psalm/Checker/CommentChecker.php | 2 +- tests/AnnotationTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Checker/CommentChecker.php b/src/Psalm/Checker/CommentChecker.php index 224ca272c..b07d5ba9b 100644 --- a/src/Psalm/Checker/CommentChecker.php +++ b/src/Psalm/Checker/CommentChecker.php @@ -213,7 +213,7 @@ class CommentChecker $type_string, $aliases, null, - $type_aliases + $type_alias_tokens + $type_aliases ); } catch (TypeParseTreeException $e) { throw new DocblockParseException($type_string . ' is not a valid type'); diff --git a/tests/AnnotationTest.php b/tests/AnnotationTest.php index 26507475c..ff47565a3 100644 --- a/tests/AnnotationTest.php +++ b/tests/AnnotationTest.php @@ -862,7 +862,8 @@ class AnnotationTest extends TestCase 'typeAliasBeforeFunction' => [ '