[FIR] TowerLevels: add missing lazy resolve
^KT-56543
This commit is contained in:
committed by
Space Team
parent
eb2cfb3d62
commit
badd09e4fd
+5
-1
@@ -23,6 +23,7 @@ import org.jetbrains.kotlin.fir.scopes.impl.FirDefaultStarImportingScope
|
|||||||
import org.jetbrains.kotlin.fir.scopes.impl.importedFromObjectOrStaticData
|
import org.jetbrains.kotlin.fir.scopes.impl.importedFromObjectOrStaticData
|
||||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||||
|
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||||
import org.jetbrains.kotlin.fir.types.*
|
import org.jetbrains.kotlin.fir.types.*
|
||||||
import org.jetbrains.kotlin.name.StandardClassIds.Annotations.HidesMembers
|
import org.jetbrains.kotlin.name.StandardClassIds.Annotations.HidesMembers
|
||||||
import org.jetbrains.kotlin.types.AbstractTypeChecker
|
import org.jetbrains.kotlin.types.AbstractTypeChecker
|
||||||
@@ -400,12 +401,15 @@ class ScopeTowerLevel(
|
|||||||
callInfo: CallInfo,
|
callInfo: CallInfo,
|
||||||
processor: TowerScopeLevelProcessor<T>
|
processor: TowerScopeLevelProcessor<T>
|
||||||
) {
|
) {
|
||||||
val candidateReceiverTypeRef = candidate.fir.receiverParameter?.typeRef
|
candidate.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||||
if (withHideMembersOnly && candidate.getAnnotationByClassId(HidesMembers, session) == null) {
|
if (withHideMembersOnly && candidate.getAnnotationByClassId(HidesMembers, session) == null) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val receiverExpected = withHideMembersOnly || areThereExtensionReceiverOptions()
|
val receiverExpected = withHideMembersOnly || areThereExtensionReceiverOptions()
|
||||||
|
val candidateReceiverTypeRef = candidate.fir.receiverParameter?.typeRef
|
||||||
if (candidateReceiverTypeRef == null == receiverExpected) return
|
if (candidateReceiverTypeRef == null == receiverExpected) return
|
||||||
|
|
||||||
val dispatchReceiverValue = dispatchReceiverValue(candidate, callInfo)
|
val dispatchReceiverValue = dispatchReceiverValue(candidate, callInfo)
|
||||||
if (dispatchReceiverValue == null && shouldSkipCandidateWithInconsistentExtensionReceiver(candidate)) {
|
if (dispatchReceiverValue == null && shouldSkipCandidateWithInconsistentExtensionReceiver(candidate)) {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_REVERSED_RESOLVE
|
|
||||||
// !CHECK_TYPE
|
// !CHECK_TYPE
|
||||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// IGNORE_REVERSED_RESOLVE
|
|
||||||
// !CHECK_TYPE
|
// !CHECK_TYPE
|
||||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user