Remove TypeSystemContext::mayBeTypeVariable optimization

It doesn't work now since anyway it's required to obtain type
constructor
At the same time, now it's not very expensive to obtain the constructor
since it's just a lookup tag
This commit is contained in:
Denis Zharkov
2020-08-20 13:07:53 +03:00
parent 9ac5dd2bce
commit cee72023fa
5 changed files with 1 additions and 17 deletions
@@ -401,10 +401,6 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
errorSupportedOnlyInTypeInference()
}
override fun KotlinTypeMarker.mayBeTypeVariable(): Boolean {
errorSupportedOnlyInTypeInference()
}
override fun CapturedTypeMarker.typeConstructorProjection(): TypeArgumentMarker {
require(this is NewCapturedType, this::errorMessage)
return this.constructor.projection
@@ -155,8 +155,6 @@ interface TypeSystemInferenceExtensionContext : TypeSystemContext, TypeSystemBui
fun TypeVariableMarker.freshTypeConstructor(): TypeConstructorMarker
fun KotlinTypeMarker.mayBeTypeVariable(): Boolean
fun CapturedTypeMarker.typeConstructorProjection(): TypeArgumentMarker
fun CapturedTypeMarker.typeParameter(): TypeParameterMarker?
fun CapturedTypeMarker.withNotNullProjection(): KotlinTypeMarker