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
@@ -180,6 +180,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
return this.arguments[index]
}
override fun KotlinTypeMarker.getArguments(): List<TypeArgumentMarker> {
require(this is KotlinType, this::errorMessage)
return this.arguments
}
override fun TypeArgumentMarker.isStarProjection(): Boolean {
require(this is TypeProjection, this::errorMessage)
return this.isStarProjection