diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/ManyCandidatesResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/ManyCandidatesResolver.kt new file mode 100644 index 00000000000..b62c7ae09e0 --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/ManyCandidatesResolver.kt @@ -0,0 +1,21 @@ +/* + * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.resolve.calls.tower + +import org.jetbrains.kotlin.resolve.calls.components.InferenceSession +import org.jetbrains.kotlin.resolve.calls.model.CallResolutionResult + +abstract class ManyCandidatesResolver : InferenceSession { + private val partiallyResolvedCalls = arrayListOf() + + override fun shouldFixTypeVariables(): Boolean { + return false + } + + override fun addPartiallyResolvedCall(call: CallResolutionResult) { + partiallyResolvedCalls.add(call) + } +} \ No newline at end of file diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/InferenceSession.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/InferenceSession.kt index 28c7c7c2b0d..b83a87c30e3 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/InferenceSession.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/components/InferenceSession.kt @@ -5,16 +5,19 @@ package org.jetbrains.kotlin.resolve.calls.components +import org.jetbrains.kotlin.resolve.calls.inference.NewConstraintSystem import org.jetbrains.kotlin.resolve.calls.model.CallResolutionResult interface InferenceSession { companion object { val default = object : InferenceSession { + override fun prepareBeforeCompletion(commonSystem: NewConstraintSystem) {} override fun shouldFixTypeVariables(): Boolean = false override fun addPartiallyResolvedCall(call: CallResolutionResult) {} } } + fun prepareBeforeCompletion(commonSystem: NewConstraintSystem) fun shouldFixTypeVariables(): Boolean fun addPartiallyResolvedCall(call: CallResolutionResult) } \ No newline at end of file