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:
parent
e9adcb8d35
commit
936a7e01b6
@ -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,
|
||||
|
@ -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;
|
||||
}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user