[psi] don't search for property initializer in decompiled code

it's not included in decompiled text, so can't be found anyway
This commit is contained in:
Anna Kozlova
2023-04-11 22:49:09 +02:00
parent b558d5fc9c
commit 171e9db1f8
@@ -268,8 +268,15 @@ public class KtProperty extends KtTypeParameterListOwnerStub<KotlinPropertyStub>
@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(), () ->