Use upper bound aware type approximator for intersection types inside sam types in contravariant positions to build proper types in terms of subtyping
This commit is contained in:
committed by
TeamCityServer
parent
6a78e0a10c
commit
4aeabb6b0f
@@ -230,6 +230,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
|
||||
return this.upperBounds[index]
|
||||
}
|
||||
|
||||
override fun TypeParameterMarker.getUpperBounds(): List<KotlinTypeMarker> {
|
||||
require(this is TypeParameterDescriptor, this::errorMessage)
|
||||
return this.upperBounds
|
||||
}
|
||||
|
||||
override fun TypeParameterMarker.getTypeConstructor(): TypeConstructorMarker {
|
||||
require(this is TypeParameterDescriptor, this::errorMessage)
|
||||
return this.typeConstructor
|
||||
|
||||
Reference in New Issue
Block a user