From 171e9db1f8efbd10e259d630074eef6f85332b61 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Tue, 11 Apr 2023 22:49:09 +0200 Subject: [PATCH] [psi] don't search for property initializer in decompiled code it's not included in decompiled text, so can't be found anyway --- .../psi/src/org/jetbrains/kotlin/psi/KtProperty.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/KtProperty.java b/compiler/psi/src/org/jetbrains/kotlin/psi/KtProperty.java index 5aee715cfac..1500acde1e0 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/KtProperty.java +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/KtProperty.java @@ -268,8 +268,15 @@ public class KtProperty extends KtTypeParameterListOwnerStub @Nullable public KtExpression getInitializer() { KotlinPropertyStub stub = getStub(); - if (stub != null && !stub.hasInitializer()) { - return null; + if (stub != null) { + if (!stub.hasInitializer()) { + return null; + } + + if (getContainingKtFile().isCompiled()) { + //don't load ast + return null; + } } return AstLoadingFilter.forceAllowTreeLoading(this.getContainingFile(), () ->