diff --git a/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php b/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php index 3306c6627ba..6187083430d 100644 --- a/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/StatementsAnalyzer.php @@ -684,7 +684,7 @@ private static function analyzeStatement( $check_type_string, $statements_analyzer->getAliases(), ); - $check_type = Type::parseString($fq_check_type_string); + $check_type = Type::parseString(CommentAnalyzer::sanitizeDocblockType($fq_check_type_string)); /** @psalm-suppress InaccessibleProperty We just created this type */ $check_type->possibly_undefined = $possibly_undefined;