[global inspections] wait for initialization in a few more places (IDEA-179389)

GitOrigin-RevId: f3e1b24eee0b8b1f259995abc0fac82ed07607c3
This commit is contained in:
Bas Leijdekkers
2021-10-13 15:37:12 +02:00
committed by intellij-monorepo-bot
parent 930d24b4f7
commit a9da3dd5ce

View File

@@ -287,6 +287,7 @@ public class RefJavaUtilImpl extends RefJavaUtil {
}
if (refConstructor != null) {
refConstructor.waitForInitialized();
refConstructor.updateParameterValues(argumentList, javaConstructor);
}
return refConstructor;
@@ -426,7 +427,7 @@ public class RefJavaUtilImpl extends RefJavaUtil {
final UElement uFrom,
final RefElement refFrom) {
UMethod uMethod = Objects.requireNonNull(UastContextKt.toUElement(psiResolved, UMethod.class));
refMethod.waitForInitialized();
if (refExpression instanceof UCallableReferenceExpression) {
PsiType returnType = uMethod.getReturnType();
if (!uMethod.isConstructor() &&