Optimize ConstraintInjector::isMyTypeVariable
Do not look into the map for constructors that are not type variables
This commit is contained in:
+6
-1
@@ -246,6 +246,11 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext,
|
||||
return this.typeConstructor
|
||||
}
|
||||
|
||||
override fun KotlinTypeMarker.mayBeTypeVariable(): Boolean {
|
||||
require(this is ConeKotlinType)
|
||||
return this is ConeTypeVariableType
|
||||
}
|
||||
|
||||
override fun CapturedTypeMarker.typeConstructorProjection(): TypeArgumentMarker {
|
||||
require(this is ConeCapturedType)
|
||||
return this.constructor.projection
|
||||
@@ -310,4 +315,4 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext,
|
||||
override fun TypeConstructorMarker.isCapturedTypeConstructor(): Boolean {
|
||||
return this is ConeCapturedTypeConstructor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user