Fix error getting completions for 'new static' type
parent
42d0c7b714
commit
c1a2bc8412
|
@ -896,11 +896,12 @@ class DefinitionResolver
|
|||
// Anonymous class
|
||||
return new Types\Object_;
|
||||
}
|
||||
$className = (string)$class->getResolvedName();
|
||||
|
||||
if ($className === 'static') {
|
||||
if ($class instanceof PhpParser\Token && $class->kind === PhpParser\TokenKind::StaticKeyword) {
|
||||
// `new static`
|
||||
return new Types\Static_;
|
||||
}
|
||||
$className = (string)$class->getResolvedName();
|
||||
|
||||
if ($className === 'self' || $className === 'parent') {
|
||||
$classNode = $class->getFirstAncestor(Node\Statement\ClassDeclaration::class);
|
||||
if ($className === 'parent') {
|
||||
|
|
Loading…
Reference in New Issue