mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-22 15:52:37 +00:00
FIR [IDE]: provide correct node phase when necessary
This commit is contained in:
committed by
Mikhail Glukhikh
parent
119302b016
commit
b1d3ab04c2
@@ -68,10 +68,14 @@ internal fun FirScope.processFunctionsAndConstructorsByName(
|
||||
processConstructorsByName(
|
||||
name, session, bodyResolveComponents,
|
||||
includeInnerConstructors = includeInnerConstructors,
|
||||
processor = processor
|
||||
processor = {
|
||||
with(bodyResolveComponents) { it.phasedFir }
|
||||
processor(it)
|
||||
}
|
||||
)
|
||||
|
||||
processFunctionsByName(name) {
|
||||
with(bodyResolveComponents) { it.phasedFir }
|
||||
processor(it)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import kotlin.coroutines.resume
|
||||
class ResolutionStageRunner(val components: InferenceComponents) {
|
||||
fun processCandidate(candidate: Candidate, stopOnFirstError: Boolean = true): CandidateApplicability {
|
||||
val sink = CheckerSinkImpl(components, stopOnFirstError = stopOnFirstError)
|
||||
with (candidate.bodyResolveComponents) { candidate.symbol.phasedFir }
|
||||
var finished = false
|
||||
sink.continuation = suspend {
|
||||
candidate.callInfo.callKind.resolutionSequence.forEachIndexed { index, stage ->
|
||||
|
||||
@@ -183,6 +183,7 @@ private class TowerScopeLevelProcessor(
|
||||
implicitExtensionReceiverValue: ImplicitReceiverValue<*>?,
|
||||
builtInExtensionFunctionReceiverValue: ReceiverValue?
|
||||
) {
|
||||
with(candidateFactory.bodyResolveComponents) { symbol.phasedFir }
|
||||
// Check explicit extension receiver for default package members
|
||||
if (symbol is FirNamedFunctionSymbol && dispatchReceiverValue == null &&
|
||||
(implicitExtensionReceiverValue == null) != (explicitReceiver == null) &&
|
||||
|
||||
@@ -87,7 +87,7 @@ class MemberScopeTowerLevel(
|
||||
if (candidate is FirCallableSymbol<*> &&
|
||||
(implicitExtensionInvokeMode || candidate.hasConsistentExtensionReceiver(extensionReceiver))
|
||||
) {
|
||||
val fir = candidate.fir
|
||||
val fir = with(bodyResolveComponents) { candidate.phasedFir }
|
||||
if ((fir as? FirConstructor)?.isInner == false) {
|
||||
return@processScopeMembers
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user