diff --git a/src/Psalm/Internal/Codebase/Reflection.php b/src/Psalm/Internal/Codebase/Reflection.php index 7475f3796..6ecbd0255 100644 --- a/src/Psalm/Internal/Codebase/Reflection.php +++ b/src/Psalm/Internal/Codebase/Reflection.php @@ -389,7 +389,7 @@ class Reflection $suffix = '|null'; } - return Type::parseString($reflection_type . $suffix); + return Type::parseString($reflection_type->getName() . $suffix); } /** diff --git a/tests/CallableTest.php b/tests/CallableTest.php index d64f582ee..14360806e 100644 --- a/tests/CallableTest.php +++ b/tests/CallableTest.php @@ -25,7 +25,7 @@ class CallableTest extends TestCase * @return void * @psalm-suppress MixedArgument */ - function fn() { + function f() { run_function( /** * @return void @@ -37,7 +37,7 @@ class CallableTest extends TestCase echo $data; } - fn();', + f();', ], 'inferredArg' => [ '