Find enclosing element for object literal in delegate #KT-8187 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
6277476573
commit
9fa16364e1
@@ -768,11 +768,14 @@ public class KtPsiUtil {
|
||||
return (KtElement) parent;
|
||||
}
|
||||
}
|
||||
if (current instanceof KtBlockExpression || current instanceof KtParameter) {
|
||||
if (current instanceof KtBlockExpression || current instanceof KtParameter || current instanceof KtValueArgument) {
|
||||
return (KtElement) current;
|
||||
}
|
||||
if (current instanceof KtValueArgument) {
|
||||
return (KtElement) current;
|
||||
if (current instanceof KtDelegatedSuperTypeEntry) {
|
||||
PsiElement grandParent = current.getParent().getParent();
|
||||
if (grandParent instanceof KtClassOrObject && !(grandParent.getParent() instanceof KtObjectLiteralExpression)) {
|
||||
return (KtElement) grandParent;
|
||||
}
|
||||
}
|
||||
|
||||
current = parent;
|
||||
|
||||
Reference in New Issue
Block a user