diff --git a/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php b/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php index 48bb9deb98a..bec5acd4b37 100644 --- a/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php +++ b/src/Psalm/Internal/PhpVisitor/Reflector/FunctionLikeDocblockScanner.php @@ -510,9 +510,7 @@ private static function getAssertionParts( $self_fqcln, null, true - ), - null, - $function_template_types + $class_template_types + ) ); } catch (TypeParseTreeException $e) { $storage->docblock_issues[] = new InvalidDocblock( diff --git a/tests/Template/FunctionTemplateAssertTest.php b/tests/Template/FunctionTemplateAssertTest.php index c203f92fa86..3a832973ed4 100644 --- a/tests/Template/FunctionTemplateAssertTest.php +++ b/tests/Template/FunctionTemplateAssertTest.php @@ -767,17 +767,6 @@ function validateUsername(string $username): void { } }' ], - 'noCrashWhenAssertingTemplatedKeyOf' => [ - ' $key - */ - function keyExists(array $arr, $key) : void {}' - ], ]; }