Move some common parts from BuiltinMethodsWithDifferentJvmName to SpecialGenericSignatures
This commit is contained in:
+3
@@ -26,6 +26,9 @@ object BuiltinSpecialProperties {
|
||||
PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP.entries
|
||||
.map { Pair(it.key.shortName(), it.value) }
|
||||
.groupBy({ it.second }, { it.first })
|
||||
.mapValues {
|
||||
it.value.distinct()
|
||||
}
|
||||
|
||||
val SPECIAL_FQ_NAMES: Set<FqName> = PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP.keys
|
||||
val SPECIAL_SHORT_NAMES: Set<Name> = SPECIAL_FQ_NAMES.map(FqName::shortName).toSet()
|
||||
|
||||
+10
-1
@@ -132,5 +132,14 @@ open class SpecialGenericSignatures {
|
||||
.map { Pair(it.key.name, it.value) }
|
||||
.groupBy({ it.second }, { it.first })
|
||||
|
||||
fun getBuiltinFunctionNamesByJvmName(name: Name): List<Name> =
|
||||
JVM_SHORT_NAME_TO_BUILTIN_SHORT_NAMES_MAP[name] ?: emptyList()
|
||||
|
||||
val Name.sameAsBuiltinMethodWithErasedValueParameters: Boolean
|
||||
get() = this in ERASED_VALUE_PARAMETERS_SHORT_NAMES
|
||||
|
||||
val Name.sameAsRenamedInJvmBuiltin: Boolean
|
||||
get() = this in ORIGINAL_SHORT_NAMES
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user