JVM IR: reuse JVM code for reified type parameter mappings instead of copy-paste
This commit is contained in:
@@ -14,6 +14,7 @@ import org.jetbrains.kotlin.types.model.*
|
||||
interface TypeSystemCommonBackendContext : TypeSystemContext {
|
||||
fun nullableAnyType(): SimpleTypeMarker
|
||||
fun arrayType(componentType: KotlinTypeMarker): SimpleTypeMarker
|
||||
fun KotlinTypeMarker.isArrayOrNullableArray(): Boolean
|
||||
|
||||
fun TypeConstructorMarker.isFinalClassOrEnumEntryOrAnnotationClassConstructor(): Boolean
|
||||
|
||||
|
||||
@@ -508,6 +508,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
|
||||
return builtIns.getArrayType(Variance.INVARIANT, componentType)
|
||||
}
|
||||
|
||||
override fun KotlinTypeMarker.isArrayOrNullableArray(): Boolean {
|
||||
require(this is KotlinType, this::errorMessage)
|
||||
return KotlinBuiltIns.isArray(this)
|
||||
}
|
||||
|
||||
override fun KotlinTypeMarker.hasAnnotation(fqName: FqName): Boolean {
|
||||
require(this is KotlinType, this::errorMessage)
|
||||
return annotations.hasAnnotation(fqName)
|
||||
|
||||
Reference in New Issue
Block a user