Get rid of FE 1.0 classes usage in ConstraintIncorporator

This commit is contained in:
Dmitriy Novozhilov
2020-08-26 13:06:16 +03:00
parent 1050f7f066
commit 64f0ee21c1
6 changed files with 56 additions and 6 deletions
@@ -0,0 +1,16 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* 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.fir.resolve.inference
import org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintSystemUtilContext
import org.jetbrains.kotlin.types.model.TypeVariableMarker
object ConeConstraintSystemUtilContext : ConstraintSystemUtilContext {
override fun TypeVariableMarker.shouldBeFlexible(): Boolean {
// TODO
return false
}
}
@@ -26,7 +26,7 @@ class InferenceComponents(
) {
val approximator: AbstractTypeApproximator = object : AbstractTypeApproximator(ctx) {}
val trivialConstraintTypeInferenceOracle = TrivialConstraintTypeInferenceOracle.create(ctx)
private val incorporator = ConstraintIncorporator(approximator, trivialConstraintTypeInferenceOracle)
private val incorporator = ConstraintIncorporator(approximator, trivialConstraintTypeInferenceOracle, ConeConstraintSystemUtilContext)
private val injector = ConstraintInjector(incorporator, approximator, KotlinTypeRefiner.Default)
val resultTypeResolver = ResultTypeResolver(approximator, trivialConstraintTypeInferenceOracle)