K2 opt-in: check callable parent class only in case of constructor call

This commit is contained in:
Mikhail Glukhikh
2022-11-18 13:12:20 +01:00
committed by Space Team
parent 73cb4d1a6e
commit a2f7224370
@@ -169,12 +169,12 @@ object FirOptInUsageBaseChecker {
ProcessorAction.NEXT
}
}
} else if (dispatchReceiverType == null) {
}
if (fir is FirConstructor) {
parentClassSymbol?.loadExperimentalities(
context, result, visited, fromSetter = false, dispatchReceiverType = null, fromSupertype = false
)
}
if (fir !is FirConstructor) {
} else {
// Without coneTypeSafe v fails in MT test (FirRenderer.kt)
fir.returnTypeRef.coneTypeSafe<ConeKotlinType>().addExperimentalities(context, result, visited)
fir.receiverParameter?.typeRef?.coneType.addExperimentalities(context, result, visited)