[FIR] Support static getters along with fake Enum.entries declaration in FIR
#KT-48872
This commit is contained in:
committed by
Space
parent
45b89de9f4
commit
93f17a2b86
@@ -22,6 +22,8 @@ object StandardNames {
|
||||
|
||||
@JvmField val ENUM_VALUES = Name.identifier("values")
|
||||
|
||||
@JvmField val ENUM_ENTRIES = Name.identifier("entries")
|
||||
|
||||
@JvmField val ENUM_VALUE_OF = Name.identifier("valueOf")
|
||||
|
||||
@JvmField val DATA_CLASS_COPY = Name.identifier("copy")
|
||||
|
||||
@@ -16,6 +16,7 @@ object StandardClassIds {
|
||||
val BASE_INTERNAL_PACKAGE = BASE_KOTLIN_PACKAGE.child(Name.identifier("internal"))
|
||||
val BASE_INTERNAL_IR_PACKAGE = BASE_INTERNAL_PACKAGE.child(Name.identifier("ir"))
|
||||
val BASE_COROUTINES_PACKAGE = BASE_KOTLIN_PACKAGE.child(Name.identifier("coroutines"))
|
||||
val BASE_ENUMS_PACKAGE = BASE_KOTLIN_PACKAGE.child(Name.identifier("enums"))
|
||||
|
||||
val builtInsPackages = setOf(
|
||||
BASE_KOTLIN_PACKAGE,
|
||||
@@ -24,7 +25,7 @@ object StandardClassIds {
|
||||
BASE_ANNOTATION_PACKAGE,
|
||||
BASE_REFLECT_PACKAGE,
|
||||
BASE_INTERNAL_PACKAGE,
|
||||
BASE_COROUTINES_PACKAGE,
|
||||
BASE_COROUTINES_PACKAGE
|
||||
)
|
||||
|
||||
val Nothing = "Nothing".baseId()
|
||||
@@ -134,6 +135,8 @@ object StandardClassIds {
|
||||
val AnnotationRetention = "AnnotationRetention".annotationId()
|
||||
val AnnotationTarget = "AnnotationTarget".annotationId()
|
||||
|
||||
val EnumEntries = "EnumEntries".enumsId()
|
||||
|
||||
object Annotations {
|
||||
val Suppress = "Suppress".baseId()
|
||||
val PublishedApi = "PublishedApi".baseId()
|
||||
@@ -213,6 +216,7 @@ private fun String.jvmInternalId() = ClassId(StandardClassIds.BASE_JVM_INTERNAL_
|
||||
private fun String.internalId() = ClassId(StandardClassIds.BASE_INTERNAL_PACKAGE, Name.identifier(this))
|
||||
private fun String.internalIrId() = ClassId(StandardClassIds.BASE_INTERNAL_IR_PACKAGE, Name.identifier(this))
|
||||
private fun String.coroutinesId() = ClassId(StandardClassIds.BASE_COROUTINES_PACKAGE, Name.identifier(this))
|
||||
private fun String.enumsId() = ClassId(StandardClassIds.BASE_ENUMS_PACKAGE, Name.identifier(this))
|
||||
|
||||
private fun String.callableId(packageName: FqName) = CallableId(packageName, Name.identifier(this))
|
||||
private fun String.callableId(classId: ClassId) = CallableId(classId, Name.identifier(this))
|
||||
|
||||
Reference in New Issue
Block a user