1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Allow bare pure-callable in namespace cc @azjezz

This commit is contained in:
Brown 2020-08-26 16:57:27 -04:00
parent e9adcb8d35
commit 936a7e01b6
2 changed files with 12 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class TypeTokenizer
'class-string' => true,
'callable-string' => true,
'callable-array' => true,
'pure-callable' => true,
'trait-string' => true,
'mysql-escaped-string' => true,
'html-escaped-string' => true,

View File

@ -191,6 +191,17 @@ class PureCallableTest extends TestCase
*/
function f(callable $p): void {}',
],
'varCallableInNamespace' => [
'<?php
namespace Foo;
/**
* @param pure-callable $c
*/
function bar(callable $c) : callable {
return $c;
}',
],
];
}