FIR: Extract StandardClassIds.KClass
This commit is contained in:
@@ -49,6 +49,7 @@ object StandardClassIds {
|
|||||||
val KProperty2 = "KProperty2".reflectId()
|
val KProperty2 = "KProperty2".reflectId()
|
||||||
val KMutableProperty2 = "KMutableProperty2".reflectId()
|
val KMutableProperty2 = "KMutableProperty2".reflectId()
|
||||||
val KFunction = "KFunction".reflectId()
|
val KFunction = "KFunction".reflectId()
|
||||||
|
val KClass = "KClass".reflectId()
|
||||||
|
|
||||||
val Comparable = "Comparable".baseId()
|
val Comparable = "Comparable".baseId()
|
||||||
val Number = "Number".baseId()
|
val Number = "Number".baseId()
|
||||||
@@ -73,4 +74,4 @@ object StandardClassIds {
|
|||||||
val elementTypeByUnsignedArrayType = unsignedArrayTypeByElementType.inverseMap()
|
val elementTypeByUnsignedArrayType = unsignedArrayTypeByElementType.inverseMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun <K, V> Map<K, V>.inverseMap() = entries.associate { (k, v) -> v to k }
|
private fun <K, V> Map<K, V>.inverseMap() = entries.associate { (k, v) -> v to k }
|
||||||
|
|||||||
+1
-1
@@ -520,7 +520,7 @@ class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransformer) :
|
|||||||
|
|
||||||
transformedGetClassCall.resultType =
|
transformedGetClassCall.resultType =
|
||||||
buildResolvedTypeRef {
|
buildResolvedTypeRef {
|
||||||
type = ClassId.fromString("kotlin/reflect/KClass").constructClassLikeType(arrayOf(typeOfExpression), false)
|
type = StandardClassIds.KClass.constructClassLikeType(arrayOf(typeOfExpression), false)
|
||||||
}
|
}
|
||||||
return transformedGetClassCall.compose()
|
return transformedGetClassCall.compose()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user