[FIR] Remove redundant resolution stage from resolution of synthetic function calls
This commit is contained in:
@@ -8,6 +8,18 @@ package org.jetbrains.kotlin.fir.resolve.calls
|
||||
sealed class CallKind {
|
||||
abstract val resolutionSequence: List<ResolutionStage>
|
||||
|
||||
/*
|
||||
* Used for resolution of synthetic calls for `when` and `try` expression
|
||||
* that are equal to `fun <K> select(vararg values: K): K`
|
||||
*/
|
||||
object SyntheticSelect : CallKind() {
|
||||
override val resolutionSequence: List<ResolutionStage> = listOf(
|
||||
MapArguments,
|
||||
CreateFreshTypeVariableSubstitutorStage,
|
||||
CheckArguments
|
||||
)
|
||||
}
|
||||
|
||||
object Function : CallKind() {
|
||||
override val resolutionSequence: List<ResolutionStage> = listOf(
|
||||
CheckVisibility,
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ class FirSyntheticCallGenerator(private val transformer: FirBodyResolveTransform
|
||||
)
|
||||
|
||||
private fun generateCallInfo(arguments: List<FirExpression>) = CallInfo(
|
||||
callKind = CallKind.Function,
|
||||
callKind = CallKind.SyntheticSelect,
|
||||
explicitReceiver = null,
|
||||
arguments = arguments,
|
||||
isSafeCall = false,
|
||||
|
||||
Reference in New Issue
Block a user