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