Implement inference context and simple components
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ import java.util.*
|
|||||||
|
|
||||||
// todo problem: intersection types in constrains: A <: Number, B <: Inv<A & Any> =>? B <: Inv<out Number & Any>
|
// todo problem: intersection types in constrains: A <: Number, B <: Inv<A & Any> =>? B <: Inv<out Number & Any>
|
||||||
class ConstraintIncorporator(
|
class ConstraintIncorporator(
|
||||||
val typeApproximator: TypeApproximator,
|
val typeApproximator: AbstractTypeApproximator,
|
||||||
val trivialConstraintTypeInferenceOracle: TrivialConstraintTypeInferenceOracle
|
val trivialConstraintTypeInferenceOracle: TrivialConstraintTypeInferenceOracle
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ import org.jetbrains.kotlin.types.model.*
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
||||||
class ConstraintInjector(val constraintIncorporator: ConstraintIncorporator, val typeApproximator: TypeApproximator) {
|
class ConstraintInjector(val constraintIncorporator: ConstraintIncorporator, val typeApproximator: AbstractTypeApproximator) {
|
||||||
private val ALLOWED_DEPTH_DELTA_FOR_INCORPORATION = 1
|
private val ALLOWED_DEPTH_DELTA_FOR_INCORPORATION = 1
|
||||||
|
|
||||||
interface Context : TypeSystemInferenceExtensionContext {
|
interface Context : TypeSystemInferenceExtensionContext {
|
||||||
|
|||||||
Reference in New Issue
Block a user