[NI] Allow capturing type projections with type variables

#KT-25302 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-04-22 17:56:55 +03:00
parent abd1c3df26
commit d40313a8d7
15 changed files with 93 additions and 31 deletions
@@ -370,6 +370,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext {
return this.constructor.projection
}
override fun CapturedTypeMarker.captureStatus(): CaptureStatus {
require(this is NewCapturedType, this::errorMessage)
return this.captureStatus
}
override fun KotlinTypeMarker.isNullableType(): Boolean {
require(this is KotlinType, this::errorMessage)
return TypeUtils.isNullableType(this)
@@ -118,6 +118,7 @@ interface TypeSystemInferenceExtensionContext : TypeSystemContext, TypeSystemBui
fun CapturedTypeMarker.typeConstructorProjection(): TypeArgumentMarker
fun CapturedTypeMarker.captureStatus(): CaptureStatus
fun KotlinTypeMarker.isNullableType(): Boolean