Don't call getClassDescriptor for local declarations (KT-15259)

#KT-15259 Open
This commit is contained in:
Nikolay Krasko
2016-12-16 16:28:40 +03:00
parent 8fe9de1d35
commit 6ca5ba3615
7 changed files with 46 additions and 3 deletions
@@ -747,7 +747,6 @@ public class KtPsiUtil {
if (((KtParameter) declaration).hasValOrVar() && parent != null && parent.getParent() instanceof KtPrimaryConstructor) {
return getEnclosingElementForLocalDeclaration(((KtPrimaryConstructor) parent.getParent()).getContainingClassOrObject(), skipParameters);
}
else if (skipParameters && parent != null && parent.getParent() instanceof KtNamedFunction) {
declaration = (KtNamedFunction) parent.getParent();
}