diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtParameter.java b/compiler/psi/src/org/jetbrains/kotlin/psi/KtParameter.java index 784901ba7fe..d9b536ef5c8 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtParameter.java +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtParameter.java @@ -157,15 +157,7 @@ public class KtParameter extends KtNamedDeclarationStub imp if (parent == null) { return false; } - if (klass.isInstance(parent.getParent())) { - //don't check ast if the tree structure is different; skip for compiled code - if (!getContainingKtFile().isCompiled() && - parent.getNextSibling() instanceof PsiErrorElement) { - return false; - } - return true; - } - return false; + return klass.isInstance(parent.getParent()); } public boolean isCatchParameter() {