JVM_IR. Support type annotations

This commit is contained in:
Mikhael Bogdanov
2020-01-28 13:06:22 +01:00
parent e4258e528f
commit 6c07dbf351
14 changed files with 191 additions and 70 deletions
@@ -32,6 +32,7 @@ interface TypeSystemCommonBackendContext : TypeSystemContext {
fun TypeConstructorMarker.getTypeParameterClassifier(): TypeParameterMarker?
fun TypeConstructorMarker.isInlineClass(): Boolean
fun TypeConstructorMarker.isInnerClass(): Boolean
fun TypeParameterMarker.getRepresentativeUpperBound(): KotlinTypeMarker
fun KotlinTypeMarker.getSubstitutedUnderlyingType(): KotlinTypeMarker?
@@ -556,6 +556,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
return (declarationDescriptor as? ClassDescriptor)?.isInline == true
}
override fun TypeConstructorMarker.isInnerClass(): Boolean {
require(this is TypeConstructor, this::errorMessage)
return (declarationDescriptor as? ClassDescriptor)?.isInner == true
}
override fun TypeParameterMarker.getRepresentativeUpperBound(): KotlinTypeMarker {
require(this is TypeParameterDescriptor, this::errorMessage)
return representativeUpperBound