Implement inferring materialized self types through a default type in ResultTypeResolver

This commit is contained in:
Victor Petukhov
2021-07-07 14:00:09 +03:00
parent 3787099a38
commit c2cf2f36cd
13 changed files with 103 additions and 60 deletions
@@ -177,6 +177,11 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
return this.typeArguments.getOrNull(index) ?: ConeStarProjection
}
override fun KotlinTypeMarker.getArguments(): List<TypeArgumentMarker> {
require(this is ConeKotlinType)
return this.typeArguments.toList()
}
override fun KotlinTypeMarker.asTypeArgument(): TypeArgumentMarker {
require(this is ConeKotlinType)
return this