Rename KotlinBuiltInsNames to StandardNames
This commit is contained in:
@@ -23,9 +23,9 @@ enum class PrimitiveType(typeName: String) {
|
||||
|
||||
val arrayTypeName: Name = Name.identifier("${typeName}Array")
|
||||
|
||||
val typeFqName: FqName by lazy(LazyThreadSafetyMode.PUBLICATION) { KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME.child(this.typeName) }
|
||||
val typeFqName: FqName by lazy(LazyThreadSafetyMode.PUBLICATION) { StandardNames.BUILT_INS_PACKAGE_FQ_NAME.child(this.typeName) }
|
||||
|
||||
val arrayTypeFqName: FqName by lazy(LazyThreadSafetyMode.PUBLICATION) { KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME.child(arrayTypeName) }
|
||||
val arrayTypeFqName: FqName by lazy(LazyThreadSafetyMode.PUBLICATION) { StandardNames.BUILT_INS_PACKAGE_FQ_NAME.child(arrayTypeName) }
|
||||
|
||||
companion object {
|
||||
@JvmField
|
||||
|
||||
+2
-7
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.builtins
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.FqNames.reflect
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.FqNames.reflect
|
||||
import org.jetbrains.kotlin.builtins.functions.FunctionClassKind
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
@@ -15,9 +15,7 @@ import org.jetbrains.kotlin.utils.newHashMapWithExpectedSize
|
||||
import org.jetbrains.kotlin.utils.newHashSetWithExpectedSize
|
||||
|
||||
@Suppress("Reformat")
|
||||
object KotlinBuiltInsNames {
|
||||
// --------------------------- From DescriptorUtils ---------------------------
|
||||
|
||||
object StandardNames {
|
||||
@JvmField val ENUM_VALUES = Name.identifier("values")
|
||||
|
||||
@JvmField val ENUM_VALUE_OF = Name.identifier("valueOf")
|
||||
@@ -34,7 +32,6 @@ object KotlinBuiltInsNames {
|
||||
|
||||
@JvmField val RESULT_FQ_NAME = FqName("kotlin.Result")
|
||||
|
||||
// --------------------------- From ReflectionTypes ---------------------------
|
||||
@JvmField val KOTLIN_REFLECT_FQ_NAME = FqName("kotlin.reflect")
|
||||
const val K_PROPERTY_PREFIX = "KProperty"
|
||||
const val K_MUTABLE_PROPERTY_PREFIX = "KMutableProperty"
|
||||
@@ -43,8 +40,6 @@ object KotlinBuiltInsNames {
|
||||
|
||||
@JvmField val PREFIXES = listOf(K_PROPERTY_PREFIX, K_MUTABLE_PROPERTY_PREFIX, K_FUNCTION_PREFIX, K_SUSPEND_FUNCTION_PREFIX)
|
||||
|
||||
// --------------------------- From KotlinBuiltIns ---------------------------
|
||||
|
||||
@JvmField
|
||||
val BUILT_INS_PACKAGE_NAME = Name.identifier("kotlin")
|
||||
|
||||
+5
-5
@@ -5,15 +5,15 @@
|
||||
|
||||
package org.jetbrains.kotlin.builtins.functions
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
enum class FunctionClassKind(val packageFqName: FqName, val classNamePrefix: String) {
|
||||
Function(KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME, "Function"),
|
||||
SuspendFunction(KotlinBuiltInsNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE, "SuspendFunction"),
|
||||
KFunction(KotlinBuiltInsNames.KOTLIN_REFLECT_FQ_NAME, "KFunction"),
|
||||
KSuspendFunction(KotlinBuiltInsNames.KOTLIN_REFLECT_FQ_NAME, "KSuspendFunction");
|
||||
Function(StandardNames.BUILT_INS_PACKAGE_FQ_NAME, "Function"),
|
||||
SuspendFunction(StandardNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE, "SuspendFunction"),
|
||||
KFunction(StandardNames.KOTLIN_REFLECT_FQ_NAME, "KFunction"),
|
||||
KSuspendFunction(StandardNames.KOTLIN_REFLECT_FQ_NAME, "KSuspendFunction");
|
||||
|
||||
fun numberedClassName(arity: Int) = Name.identifier("$classNamePrefix$arity")
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ package org.jetbrains.kotlin.builtins.jvm
|
||||
|
||||
import org.jetbrains.kotlin.builtins.CompanionObjectMapping
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.FqNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.FqNames
|
||||
import org.jetbrains.kotlin.builtins.PlatformToKotlinClassMap
|
||||
import org.jetbrains.kotlin.builtins.functions.FunctionClassKind
|
||||
import org.jetbrains.kotlin.builtins.functions.FunctionInvokeDescriptor
|
||||
@@ -87,7 +87,7 @@ object JavaToKotlinClassMap : PlatformToKotlinClassMap {
|
||||
for (jvmType in JvmPrimitiveType.values()) {
|
||||
add(
|
||||
ClassId.topLevel(jvmType.wrapperFqName),
|
||||
ClassId.topLevel(KotlinBuiltInsNames.getPrimitiveFqName(jvmType.primitiveType))
|
||||
ClassId.topLevel(StandardNames.getPrimitiveFqName(jvmType.primitiveType))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ object JavaToKotlinClassMap : PlatformToKotlinClassMap {
|
||||
}
|
||||
|
||||
for (i in 0 until FunctionInvokeDescriptor.BIG_ARITY) {
|
||||
add(ClassId.topLevel(FqName("kotlin.jvm.functions.Function$i")), KotlinBuiltInsNames.getFunctionClassId(i))
|
||||
add(ClassId.topLevel(FqName("kotlin.jvm.functions.Function$i")), StandardNames.getFunctionClassId(i))
|
||||
addKotlinToJava(FqName(NUMBERED_K_FUNCTION_PREFIX + i), K_FUNCTION_CLASS_ID)
|
||||
}
|
||||
for (i in 0 until FunctionInvokeDescriptor.BIG_ARITY - 1) {
|
||||
@@ -133,7 +133,7 @@ object JavaToKotlinClassMap : PlatformToKotlinClassMap {
|
||||
|
||||
fun mapJavaToKotlin(fqName: FqName, builtIns: KotlinBuiltIns, functionTypeArity: Int? = null): ClassDescriptor? {
|
||||
val kotlinClassId =
|
||||
if (functionTypeArity != null && fqName == FUNCTION_N_FQ_NAME) KotlinBuiltInsNames.getFunctionClassId(functionTypeArity)
|
||||
if (functionTypeArity != null && fqName == FUNCTION_N_FQ_NAME) StandardNames.getFunctionClassId(functionTypeArity)
|
||||
else mapJavaToKotlin(fqName)
|
||||
return if (kotlinClassId != null) builtIns.getBuiltInClassByFqName(kotlinClassId.asSingleFqName()) else null
|
||||
}
|
||||
|
||||
+4
-4
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.builtins.jvm
|
||||
|
||||
import org.jetbrains.kotlin.builtins.BuiltInsPackageFragment
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.deserialization.ClassDescriptorFactory
|
||||
import org.jetbrains.kotlin.descriptors.impl.ClassDescriptorImpl
|
||||
@@ -49,8 +49,8 @@ class JvmBuiltInClassDescriptorFactory(
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val KOTLIN_FQ_NAME = KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME
|
||||
private val CLONEABLE_NAME = KotlinBuiltInsNames.FqNames.cloneable.shortName()
|
||||
val CLONEABLE_CLASS_ID = ClassId.topLevel(KotlinBuiltInsNames.FqNames.cloneable.toSafe())
|
||||
private val KOTLIN_FQ_NAME = StandardNames.BUILT_INS_PACKAGE_FQ_NAME
|
||||
private val CLONEABLE_NAME = StandardNames.FqNames.cloneable.shortName()
|
||||
val CLONEABLE_CLASS_ID = ClassId.topLevel(StandardNames.FqNames.cloneable.toSafe())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.builtins.jvm
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.annotations.createDeprecatedAnnotation
|
||||
@@ -339,7 +339,7 @@ open class JvmBuiltInsSettings(
|
||||
}
|
||||
|
||||
private fun isArrayOrPrimitiveArray(fqName: FqNameUnsafe): Boolean {
|
||||
return fqName == KotlinBuiltInsNames.FqNames.array || KotlinBuiltInsNames.isPrimitiveArray(fqName)
|
||||
return fqName == StandardNames.FqNames.array || StandardNames.isPrimitiveArray(fqName)
|
||||
}
|
||||
|
||||
val DROP_LIST_METHOD_SIGNATURES: Set<String> =
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.java
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.FqNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.FqNames
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
object FakePureImplementationsProvider {
|
||||
|
||||
+19
-19
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.java.components
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.SourceElement
|
||||
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.annotations.KotlinRetention
|
||||
@@ -57,8 +57,8 @@ object JavaAnnotationMapper {
|
||||
when (annotation.classId) {
|
||||
ClassId.topLevel(JAVA_TARGET_FQ_NAME) -> JavaTargetAnnotationDescriptor(annotation, c)
|
||||
ClassId.topLevel(JAVA_RETENTION_FQ_NAME) -> JavaRetentionAnnotationDescriptor(annotation, c)
|
||||
ClassId.topLevel(JAVA_REPEATABLE_FQ_NAME) -> JavaAnnotationDescriptor(c, annotation, KotlinBuiltInsNames.FqNames.repeatable)
|
||||
ClassId.topLevel(JAVA_DOCUMENTED_FQ_NAME) -> JavaAnnotationDescriptor(c, annotation, KotlinBuiltInsNames.FqNames.mustBeDocumented)
|
||||
ClassId.topLevel(JAVA_REPEATABLE_FQ_NAME) -> JavaAnnotationDescriptor(c, annotation, StandardNames.FqNames.repeatable)
|
||||
ClassId.topLevel(JAVA_DOCUMENTED_FQ_NAME) -> JavaAnnotationDescriptor(c, annotation, StandardNames.FqNames.mustBeDocumented)
|
||||
ClassId.topLevel(JAVA_DEPRECATED_FQ_NAME) -> null
|
||||
else -> LazyJavaAnnotationDescriptor(c, annotation)
|
||||
}
|
||||
@@ -68,7 +68,7 @@ object JavaAnnotationMapper {
|
||||
annotationOwner: JavaAnnotationOwner,
|
||||
c: LazyJavaResolverContext
|
||||
): AnnotationDescriptor? {
|
||||
if (kotlinName == KotlinBuiltInsNames.FqNames.deprecated) {
|
||||
if (kotlinName == StandardNames.FqNames.deprecated) {
|
||||
val javaAnnotation = annotationOwner.findAnnotation(JAVA_DEPRECATED_FQ_NAME)
|
||||
if (javaAnnotation != null || annotationOwner.isDeprecatedInJavaDoc) {
|
||||
return JavaDeprecatedAnnotationDescriptor(javaAnnotation, c)
|
||||
@@ -84,19 +84,19 @@ object JavaAnnotationMapper {
|
||||
// kotlin.annotation.annotation is treated separately
|
||||
private val kotlinToJavaNameMap: Map<FqName, FqName> =
|
||||
mapOf(
|
||||
KotlinBuiltInsNames.FqNames.target to JAVA_TARGET_FQ_NAME,
|
||||
KotlinBuiltInsNames.FqNames.retention to JAVA_RETENTION_FQ_NAME,
|
||||
KotlinBuiltInsNames.FqNames.repeatable to JAVA_REPEATABLE_FQ_NAME,
|
||||
KotlinBuiltInsNames.FqNames.mustBeDocumented to JAVA_DOCUMENTED_FQ_NAME
|
||||
StandardNames.FqNames.target to JAVA_TARGET_FQ_NAME,
|
||||
StandardNames.FqNames.retention to JAVA_RETENTION_FQ_NAME,
|
||||
StandardNames.FqNames.repeatable to JAVA_REPEATABLE_FQ_NAME,
|
||||
StandardNames.FqNames.mustBeDocumented to JAVA_DOCUMENTED_FQ_NAME
|
||||
)
|
||||
|
||||
val javaToKotlinNameMap: Map<FqName, FqName> =
|
||||
mapOf(
|
||||
JAVA_TARGET_FQ_NAME to KotlinBuiltInsNames.FqNames.target,
|
||||
JAVA_RETENTION_FQ_NAME to KotlinBuiltInsNames.FqNames.retention,
|
||||
JAVA_DEPRECATED_FQ_NAME to KotlinBuiltInsNames.FqNames.deprecated,
|
||||
JAVA_REPEATABLE_FQ_NAME to KotlinBuiltInsNames.FqNames.repeatable,
|
||||
JAVA_DOCUMENTED_FQ_NAME to KotlinBuiltInsNames.FqNames.mustBeDocumented
|
||||
JAVA_TARGET_FQ_NAME to StandardNames.FqNames.target,
|
||||
JAVA_RETENTION_FQ_NAME to StandardNames.FqNames.retention,
|
||||
JAVA_DEPRECATED_FQ_NAME to StandardNames.FqNames.deprecated,
|
||||
JAVA_REPEATABLE_FQ_NAME to StandardNames.FqNames.repeatable,
|
||||
JAVA_DOCUMENTED_FQ_NAME to StandardNames.FqNames.mustBeDocumented
|
||||
)
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ open class JavaAnnotationDescriptor(
|
||||
class JavaDeprecatedAnnotationDescriptor(
|
||||
annotation: JavaAnnotation?,
|
||||
c: LazyJavaResolverContext
|
||||
) : JavaAnnotationDescriptor(c, annotation, KotlinBuiltInsNames.FqNames.deprecated) {
|
||||
) : JavaAnnotationDescriptor(c, annotation, StandardNames.FqNames.deprecated) {
|
||||
override val allValueArguments: Map<Name, ConstantValue<*>> by c.storageManager.createLazyValue {
|
||||
mapOf(JavaAnnotationMapper.DEPRECATED_ANNOTATION_MESSAGE to StringValue("Deprecated in Java"))
|
||||
}
|
||||
@@ -128,7 +128,7 @@ class JavaDeprecatedAnnotationDescriptor(
|
||||
class JavaTargetAnnotationDescriptor(
|
||||
annotation: JavaAnnotation,
|
||||
c: LazyJavaResolverContext
|
||||
) : JavaAnnotationDescriptor(c, annotation, KotlinBuiltInsNames.FqNames.target) {
|
||||
) : JavaAnnotationDescriptor(c, annotation, StandardNames.FqNames.target) {
|
||||
override val allValueArguments by c.storageManager.createLazyValue {
|
||||
val targetArgument = when (firstArgument) {
|
||||
is JavaArrayAnnotationArgument -> JavaAnnotationTargetMapper.mapJavaTargetArguments(firstArgument.getElements())
|
||||
@@ -142,7 +142,7 @@ class JavaTargetAnnotationDescriptor(
|
||||
class JavaRetentionAnnotationDescriptor(
|
||||
annotation: JavaAnnotation,
|
||||
c: LazyJavaResolverContext
|
||||
) : JavaAnnotationDescriptor(c, annotation, KotlinBuiltInsNames.FqNames.retention) {
|
||||
) : JavaAnnotationDescriptor(c, annotation, StandardNames.FqNames.retention) {
|
||||
override val allValueArguments by c.storageManager.createLazyValue {
|
||||
val retentionArgument = JavaAnnotationTargetMapper.mapJavaRetentionArgument(firstArgument)
|
||||
retentionArgument?.let { mapOf(JavaAnnotationMapper.RETENTION_ANNOTATION_VALUE to it) }.orEmpty()
|
||||
@@ -170,12 +170,12 @@ object JavaAnnotationTargetMapper {
|
||||
val kotlinTargets = arguments.filterIsInstance<JavaEnumValueAnnotationArgument>()
|
||||
.flatMap { mapJavaTargetArgumentByName(it.entryName?.asString()) }
|
||||
.map { kotlinTarget ->
|
||||
EnumValue(ClassId.topLevel(KotlinBuiltInsNames.FqNames.annotationTarget), Name.identifier(kotlinTarget.name))
|
||||
EnumValue(ClassId.topLevel(StandardNames.FqNames.annotationTarget), Name.identifier(kotlinTarget.name))
|
||||
}
|
||||
return ArrayValue(kotlinTargets) { module ->
|
||||
val parameterDescriptor = DescriptorResolverUtils.getAnnotationParameterByName(
|
||||
JavaAnnotationMapper.TARGET_ANNOTATION_ALLOWED_TARGETS,
|
||||
module.builtIns.getBuiltInClassByFqName(KotlinBuiltInsNames.FqNames.target)
|
||||
module.builtIns.getBuiltInClassByFqName(StandardNames.FqNames.target)
|
||||
)
|
||||
parameterDescriptor?.type ?: ErrorUtils.createErrorType("Error: AnnotationTarget[]")
|
||||
}
|
||||
@@ -191,7 +191,7 @@ object JavaAnnotationTargetMapper {
|
||||
// Map argument: java.lang.annotation.Retention -> kotlin.annotation.Retention
|
||||
return (element as? JavaEnumValueAnnotationArgument)?.let {
|
||||
retentionNameList[it.entryName?.asString()]?.let { retention ->
|
||||
EnumValue(ClassId.topLevel(KotlinBuiltInsNames.FqNames.annotationRetention), Name.identifier(retention.name))
|
||||
EnumValue(ClassId.topLevel(StandardNames.FqNames.annotationRetention), Name.identifier(retention.name))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.java.lazy
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.load.java.components.JavaAnnotationMapper
|
||||
import org.jetbrains.kotlin.load.java.structure.JavaAnnotation
|
||||
@@ -38,7 +38,7 @@ class LazyJavaAnnotations(
|
||||
override fun iterator() =
|
||||
(annotationOwner.annotations.asSequence().map(annotationDescriptors) +
|
||||
JavaAnnotationMapper.findMappedJavaAnnotation(
|
||||
KotlinBuiltInsNames.FqNames.deprecated,
|
||||
StandardNames.FqNames.deprecated,
|
||||
annotationOwner,
|
||||
c
|
||||
)).filterNotNull().iterator()
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.load.java.lazy.descriptors
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.builtins.jvm.createMappedTypeParametersSubstitution
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
@@ -226,7 +226,7 @@ class LazyJavaClassDescriptor(
|
||||
|
||||
private fun getPurelyImplementedSupertype(): KotlinType? {
|
||||
val annotatedPurelyImplementedFqName = getPurelyImplementsFqNameFromAnnotation()?.takeIf { fqName ->
|
||||
!fqName.isRoot && fqName.startsWith(KotlinBuiltInsNames.BUILT_INS_PACKAGE_NAME)
|
||||
!fqName.isRoot && fqName.startsWith(StandardNames.BUILT_INS_PACKAGE_NAME)
|
||||
}
|
||||
|
||||
val purelyImplementedFqName =
|
||||
|
||||
+4
-4
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.java.lazy.descriptors
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ClassifierDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
@@ -46,7 +46,7 @@ class LazyJavaStaticClassScope(
|
||||
declaredMemberIndex().getMethodNames().toMutableSet().apply {
|
||||
addAll(ownerDescriptor.getParentJavaStaticClassScope()?.getFunctionNames().orEmpty())
|
||||
if (jClass.isEnum) {
|
||||
addAll(listOf(KotlinBuiltInsNames.ENUM_VALUE_OF, KotlinBuiltInsNames.ENUM_VALUES))
|
||||
addAll(listOf(StandardNames.ENUM_VALUE_OF, StandardNames.ENUM_VALUES))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ class LazyJavaStaticClassScope(
|
||||
|
||||
if (jClass.isEnum) {
|
||||
when (name) {
|
||||
KotlinBuiltInsNames.ENUM_VALUE_OF -> result.add(createEnumValueOfMethod(ownerDescriptor))
|
||||
KotlinBuiltInsNames.ENUM_VALUES -> result.add(createEnumValuesMethod(ownerDescriptor))
|
||||
StandardNames.ENUM_VALUE_OF -> result.add(createEnumValueOfMethod(ownerDescriptor))
|
||||
StandardNames.ENUM_VALUES -> result.add(createEnumValuesMethod(ownerDescriptor))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package org.jetbrains.kotlin.load.java
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.FqNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.FqNames
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.load.java.BuiltinMethodsWithSpecialGenericSignature.getSpecialSignatureInfo
|
||||
import org.jetbrains.kotlin.load.java.BuiltinMethodsWithSpecialGenericSignature.sameAsBuiltinMethodWithErasedValueParameters
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.load.kotlin
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.builtins.PrimitiveType
|
||||
import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
@@ -58,7 +58,7 @@ fun forceSingleValueParameterBoxing(f: CallableDescriptor): Boolean {
|
||||
?: return false
|
||||
|
||||
val overriddenParameterType = overridden.original.valueParameters.single().type.mapToJvmType()
|
||||
return overridden.containingDeclaration.fqNameUnsafe == KotlinBuiltInsNames.FqNames.mutableCollection.toUnsafe()
|
||||
return overridden.containingDeclaration.fqNameUnsafe == StandardNames.FqNames.mutableCollection.toUnsafe()
|
||||
&& overriddenParameterType is JvmType.Object && overriddenParameterType.internalName == "java/lang/Object"
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.resolve.jvm
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||
@@ -48,7 +48,7 @@ private fun KotlinType.requiresFunctionNameManglingInParameterTypes() =
|
||||
isInlineClassThatRequiresMangling() || isTypeParameterWithUpperBoundThatRequiresMangling()
|
||||
|
||||
private fun isDontMangleClass(classDescriptor: ClassDescriptor) =
|
||||
classDescriptor.fqNameSafe == KotlinBuiltInsNames.RESULT_FQ_NAME
|
||||
classDescriptor.fqNameSafe == StandardNames.RESULT_FQ_NAME
|
||||
|
||||
private fun KotlinType.isTypeParameterWithUpperBoundThatRequiresMangling(): Boolean {
|
||||
val descriptor = constructor.declarationDescriptor as? TypeParameterDescriptor ?: return false
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.descriptors.runtime.components
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap
|
||||
import org.jetbrains.kotlin.descriptors.runtime.structure.classId
|
||||
import org.jetbrains.kotlin.descriptors.runtime.structure.desc
|
||||
@@ -196,7 +196,7 @@ private object ReflectClassStructure {
|
||||
if (currentClass.isPrimitive) {
|
||||
if (currentClass == Void.TYPE) {
|
||||
// void.class is not representable in Kotlin, we approximate it by Unit::class
|
||||
return ClassLiteralValue(ClassId.topLevel(KotlinBuiltInsNames.FqNames.unit.toSafe()), dimensions)
|
||||
return ClassLiteralValue(ClassId.topLevel(StandardNames.FqNames.unit.toSafe()), dimensions)
|
||||
}
|
||||
|
||||
val primitiveType = JvmPrimitiveType.get(currentClass.name).primitiveType
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.descriptors.runtime.components
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.load.java.structure.JavaClass
|
||||
import org.jetbrains.kotlin.load.kotlin.KotlinClassFinder
|
||||
import org.jetbrains.kotlin.load.kotlin.KotlinClassFinder.Result.KotlinClass
|
||||
@@ -47,7 +47,7 @@ class ReflectKotlinClassFinder(private val classLoader: ClassLoader) : KotlinCla
|
||||
override fun hasMetadataPackage(fqName: FqName): Boolean = false
|
||||
|
||||
override fun findBuiltInsData(packageFqName: FqName): InputStream? {
|
||||
if (!packageFqName.startsWith(KotlinBuiltInsNames.BUILT_INS_PACKAGE_NAME)) return null
|
||||
if (!packageFqName.startsWith(StandardNames.BUILT_INS_PACKAGE_NAME)) return null
|
||||
|
||||
return builtInsResourceLoader.loadResource(BuiltInSerializerProtocol.getBuiltInsFilePath(packageFqName))
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ import java.util.*
|
||||
|
||||
object CompanionObjectMapping {
|
||||
private val classIds =
|
||||
(PrimitiveType.NUMBER_TYPES.map(KotlinBuiltInsNames::getPrimitiveFqName) +
|
||||
KotlinBuiltInsNames.FqNames.string.toSafe() +
|
||||
KotlinBuiltInsNames.FqNames._boolean.toSafe() +
|
||||
KotlinBuiltInsNames.FqNames._enum.toSafe()).mapTo(linkedSetOf<ClassId>(), ClassId::topLevel)
|
||||
(PrimitiveType.NUMBER_TYPES.map(StandardNames::getPrimitiveFqName) +
|
||||
StandardNames.FqNames.string.toSafe() +
|
||||
StandardNames.FqNames._boolean.toSafe() +
|
||||
StandardNames.FqNames._enum.toSafe()).mapTo(linkedSetOf<ClassId>(), ClassId::topLevel)
|
||||
|
||||
fun allClassesWithIntrinsicCompanions(): Set<ClassId> =
|
||||
Collections.unmodifiableSet(classIds)
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.jetbrains.kotlin.types.checker.KotlinTypeChecker;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.*;
|
||||
import static org.jetbrains.kotlin.builtins.StandardNames.*;
|
||||
import static org.jetbrains.kotlin.builtins.PrimitiveType.*;
|
||||
import static org.jetbrains.kotlin.resolve.DescriptorUtils.getFqName;
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
package org.jetbrains.kotlin.builtins
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.KOTLIN_REFLECT_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.K_FUNCTION_PREFIX
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.K_SUSPEND_FUNCTION_PREFIX
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.PREFIXES
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.BUILT_INS_PACKAGE_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.KOTLIN_REFLECT_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.K_FUNCTION_PREFIX
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.K_SUSPEND_FUNCTION_PREFIX
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.PREFIXES
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
@@ -112,16 +112,16 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
hasKCallableTypeFqName(type) || type.constructor.supertypes.any { isKCallableType(it) }
|
||||
|
||||
fun hasKCallableTypeFqName(type: KotlinType): Boolean =
|
||||
hasFqName(type.constructor, KotlinBuiltInsNames.FqNames.kCallable)
|
||||
hasFqName(type.constructor, StandardNames.FqNames.kCallable)
|
||||
|
||||
fun hasKMutablePropertyTypeFqName(type: KotlinType): Boolean =
|
||||
hasFqName(type.constructor, KotlinBuiltInsNames.FqNames.kMutablePropertyFqName)
|
||||
hasFqName(type.constructor, StandardNames.FqNames.kMutablePropertyFqName)
|
||||
|
||||
fun isNumberedKMutablePropertyType(type: KotlinType): Boolean {
|
||||
val descriptor = type.constructor.declarationDescriptor as? ClassDescriptor ?: return false
|
||||
return hasFqName(descriptor, KotlinBuiltInsNames.FqNames.kMutableProperty0) ||
|
||||
hasFqName(descriptor, KotlinBuiltInsNames.FqNames.kMutableProperty1) ||
|
||||
hasFqName(descriptor, KotlinBuiltInsNames.FqNames.kMutableProperty2)
|
||||
return hasFqName(descriptor, StandardNames.FqNames.kMutableProperty0) ||
|
||||
hasFqName(descriptor, StandardNames.FqNames.kMutableProperty1) ||
|
||||
hasFqName(descriptor, StandardNames.FqNames.kMutableProperty2)
|
||||
}
|
||||
|
||||
fun isNumberedTypeWithOneOrMoreNumber(type: KotlinType): Boolean {
|
||||
@@ -142,13 +142,13 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
}
|
||||
|
||||
fun hasKPropertyTypeFqName(type: KotlinType): Boolean =
|
||||
hasFqName(type.constructor, KotlinBuiltInsNames.FqNames.kPropertyFqName)
|
||||
hasFqName(type.constructor, StandardNames.FqNames.kPropertyFqName)
|
||||
|
||||
fun isNumberedKPropertyType(type: KotlinType): Boolean {
|
||||
val descriptor = type.constructor.declarationDescriptor as? ClassDescriptor ?: return false
|
||||
return hasFqName(descriptor, KotlinBuiltInsNames.FqNames.kProperty0) ||
|
||||
hasFqName(descriptor, KotlinBuiltInsNames.FqNames.kProperty1) ||
|
||||
hasFqName(descriptor, KotlinBuiltInsNames.FqNames.kProperty2)
|
||||
return hasFqName(descriptor, StandardNames.FqNames.kProperty0) ||
|
||||
hasFqName(descriptor, StandardNames.FqNames.kProperty1) ||
|
||||
hasFqName(descriptor, StandardNames.FqNames.kProperty2)
|
||||
}
|
||||
|
||||
fun isNumberedKFunctionOrKSuspendFunction(type: KotlinType): Boolean {
|
||||
@@ -180,7 +180,7 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
}
|
||||
|
||||
fun createKPropertyStarType(module: ModuleDescriptor): KotlinType? {
|
||||
val kPropertyClass = module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.kProperty) ?: return null
|
||||
val kPropertyClass = module.findClassAcrossModuleDependencies(StandardNames.FqNames.kProperty) ?: return null
|
||||
return KotlinTypeFactory.simpleNotNullType(Annotations.EMPTY, kPropertyClass,
|
||||
listOf(StarProjectionImpl(kPropertyClass.typeConstructor.parameters.single())))
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ object UnsignedTypes {
|
||||
fun isUnsignedClass(descriptor: DeclarationDescriptor): Boolean {
|
||||
val container = descriptor.containingDeclaration
|
||||
return container is PackageFragmentDescriptor &&
|
||||
container.fqName == KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME &&
|
||||
container.fqName == StandardNames.BUILT_INS_PACKAGE_FQ_NAME &&
|
||||
descriptor.name in UnsignedTypes.unsignedTypeNames
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.builtins
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.BUILT_INS_PACKAGE_NAME
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.BUILT_INS_PACKAGE_NAME
|
||||
import org.jetbrains.kotlin.builtins.functions.BuiltInFictitiousFunctionClassFactory
|
||||
import org.jetbrains.kotlin.builtins.functions.FunctionClassKind
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
@@ -87,7 +87,7 @@ val DeclarationDescriptor.isBuiltinFunctionalClassDescriptor: Boolean
|
||||
}
|
||||
|
||||
fun isBuiltinFunctionClass(classId: ClassId): Boolean {
|
||||
if (!classId.startsWith(KotlinBuiltInsNames.BUILT_INS_PACKAGE_NAME)) return false
|
||||
if (!classId.startsWith(StandardNames.BUILT_INS_PACKAGE_NAME)) return false
|
||||
|
||||
val kind = classId.asSingleFqName().toUnsafe().getFunctionalClassKind()
|
||||
return kind == FunctionClassKind.Function ||
|
||||
@@ -104,7 +104,7 @@ val KotlinType.isBuiltinExtensionFunctionalType: Boolean
|
||||
get() = isBuiltinFunctionalType && isTypeAnnotatedWithExtensionFunctionType
|
||||
|
||||
private val KotlinType.isTypeAnnotatedWithExtensionFunctionType: Boolean
|
||||
get() = annotations.findAnnotation(KotlinBuiltInsNames.FqNames.extensionFunctionType) != null
|
||||
get() = annotations.findAnnotation(StandardNames.FqNames.extensionFunctionType) != null
|
||||
|
||||
/**
|
||||
* @return true if this is an FQ name of a fictitious class representing the function type,
|
||||
@@ -174,7 +174,7 @@ fun KotlinType.getPureArgumentsForFunctionalTypeOrSubtype(): List<KotlinType> {
|
||||
}
|
||||
|
||||
fun KotlinType.extractParameterNameFromFunctionTypeArgument(): Name? {
|
||||
val annotation = annotations.findAnnotation(KotlinBuiltInsNames.FqNames.parameterName) ?: return null
|
||||
val annotation = annotations.findAnnotation(StandardNames.FqNames.parameterName) ?: return null
|
||||
val name = (annotation.allValueArguments.values.singleOrNull() as? StringValue)
|
||||
?.value
|
||||
?.takeIf { Name.isValidIdentifier(it) }
|
||||
@@ -198,7 +198,7 @@ fun getFunctionTypeArgumentProjections(
|
||||
val typeToUse = if (name != null) {
|
||||
val parameterNameAnnotation = BuiltInAnnotationDescriptor(
|
||||
builtIns,
|
||||
KotlinBuiltInsNames.FqNames.parameterName,
|
||||
StandardNames.FqNames.parameterName,
|
||||
mapOf(Name.identifier("name") to StringValue(name.asString()))
|
||||
)
|
||||
type.replaceAnnotations(Annotations.create(type.annotations + parameterNameAnnotation))
|
||||
@@ -234,16 +234,16 @@ fun createFunctionType(
|
||||
return KotlinTypeFactory.simpleNotNullType(typeAnnotations, classDescriptor, arguments)
|
||||
}
|
||||
|
||||
fun Annotations.hasExtensionFunctionAnnotation() = hasAnnotation(KotlinBuiltInsNames.FqNames.extensionFunctionType)
|
||||
fun Annotations.hasExtensionFunctionAnnotation() = hasAnnotation(StandardNames.FqNames.extensionFunctionType)
|
||||
|
||||
fun Annotations.withoutExtensionFunctionAnnotation() =
|
||||
FilteredAnnotations(this, true) { it != KotlinBuiltInsNames.FqNames.extensionFunctionType }
|
||||
FilteredAnnotations(this, true) { it != StandardNames.FqNames.extensionFunctionType }
|
||||
|
||||
fun Annotations.withExtensionFunctionAnnotation(builtIns: KotlinBuiltIns) =
|
||||
if (hasAnnotation(KotlinBuiltInsNames.FqNames.extensionFunctionType)) {
|
||||
if (hasAnnotation(StandardNames.FqNames.extensionFunctionType)) {
|
||||
this
|
||||
} else {
|
||||
Annotations.create(this + BuiltInAnnotationDescriptor(builtIns, KotlinBuiltInsNames.FqNames.extensionFunctionType, emptyMap()))
|
||||
Annotations.create(this + BuiltInAnnotationDescriptor(builtIns, StandardNames.FqNames.extensionFunctionType, emptyMap()))
|
||||
}
|
||||
|
||||
fun getFunctionDescriptor(builtIns: KotlinBuiltIns, parameterCount: Int, isSuspendFunction: Boolean) =
|
||||
|
||||
+3
-3
@@ -5,9 +5,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.builtins.functions
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.KOTLIN_REFLECT_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.BUILT_INS_PACKAGE_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.KOTLIN_REFLECT_FQ_NAME
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.impl.AbstractClassDescriptor
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
package org.jetbrains.kotlin.builtins.functions
|
||||
|
||||
import org.jetbrains.kotlin.builtins.FunctionInterfacePackageFragment
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.KOTLIN_REFLECT_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.BUILT_INS_PACKAGE_FQ_NAME
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.KOTLIN_REFLECT_FQ_NAME
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.deserialization.ClassDescriptorFactory
|
||||
import org.jetbrains.kotlin.descriptors.impl.PackageFragmentDescriptorImpl
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
|
||||
package org.jetbrains.kotlin.builtins
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.CONTINUATION_INTERFACE_FQ_NAME_EXPERIMENTAL
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.CONTINUATION_INTERFACE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.COROUTINES_PACKAGE_FQ_NAME_EXPERIMENTAL
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.CONTINUATION_INTERFACE_FQ_NAME_EXPERIMENTAL
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.CONTINUATION_INTERFACE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.COROUTINES_PACKAGE_FQ_NAME_EXPERIMENTAL
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.COROUTINES_PACKAGE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.SourceElement
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.jetbrains.kotlin.descriptors.annotations
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.constants.AnnotationValue
|
||||
@@ -33,7 +33,7 @@ fun KotlinBuiltIns.createDeprecatedAnnotation(
|
||||
): AnnotationDescriptor {
|
||||
val replaceWithAnnotation = BuiltInAnnotationDescriptor(
|
||||
this,
|
||||
KotlinBuiltInsNames.FqNames.replaceWith,
|
||||
StandardNames.FqNames.replaceWith,
|
||||
mapOf(
|
||||
REPLACE_WITH_EXPRESSION_NAME to StringValue(replaceWith),
|
||||
REPLACE_WITH_IMPORTS_NAME to ArrayValue(emptyList()) { module ->
|
||||
@@ -44,12 +44,12 @@ fun KotlinBuiltIns.createDeprecatedAnnotation(
|
||||
|
||||
return BuiltInAnnotationDescriptor(
|
||||
this,
|
||||
KotlinBuiltInsNames.FqNames.deprecated,
|
||||
StandardNames.FqNames.deprecated,
|
||||
mapOf(
|
||||
DEPRECATED_MESSAGE_NAME to StringValue(message),
|
||||
DEPRECATED_REPLACE_WITH_NAME to AnnotationValue(replaceWithAnnotation),
|
||||
DEPRECATED_LEVEL_NAME to EnumValue(
|
||||
ClassId.topLevel(KotlinBuiltInsNames.FqNames.deprecationLevel),
|
||||
ClassId.topLevel(StandardNames.FqNames.deprecationLevel),
|
||||
Name.identifier(level)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
package org.jetbrains.kotlin.descriptors
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.CONTINUATION_INTERFACE_FQ_NAME_EXPERIMENTAL
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.CONTINUATION_INTERFACE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.CONTINUATION_INTERFACE_FQ_NAME_EXPERIMENTAL
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.CONTINUATION_INTERFACE_FQ_NAME_RELEASE
|
||||
import org.jetbrains.kotlin.incremental.components.LookupLocation
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
@@ -36,7 +36,7 @@ internal class DescriptorRendererImpl(
|
||||
|
||||
private val functionTypeAnnotationsRenderer: DescriptorRendererImpl by lazy {
|
||||
withOptions {
|
||||
excludedTypeAnnotationClasses += listOf(KotlinBuiltInsNames.FqNames.extensionFunctionType)
|
||||
excludedTypeAnnotationClasses += listOf(StandardNames.FqNames.extensionFunctionType)
|
||||
annotationArgumentsRenderingPolicy = AnnotationArgumentsRenderingPolicy.ALWAYS_PARENTHESIZED
|
||||
} as DescriptorRendererImpl
|
||||
}
|
||||
@@ -424,7 +424,7 @@ internal class DescriptorRendererImpl(
|
||||
}
|
||||
|
||||
private fun AnnotationDescriptor.isParameterName(): Boolean {
|
||||
return fqName == KotlinBuiltInsNames.FqNames.parameterName
|
||||
return fqName == StandardNames.FqNames.parameterName
|
||||
}
|
||||
|
||||
override fun renderAnnotation(annotation: AnnotationDescriptor, target: AnnotationUseSiteTarget?): String {
|
||||
|
||||
@@ -28,8 +28,8 @@ import org.jetbrains.kotlin.types.Variance;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.ENUM_VALUES;
|
||||
import static org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.ENUM_VALUE_OF;
|
||||
import static org.jetbrains.kotlin.builtins.StandardNames.ENUM_VALUES;
|
||||
import static org.jetbrains.kotlin.builtins.StandardNames.ENUM_VALUE_OF;
|
||||
import static org.jetbrains.kotlin.resolve.DescriptorUtils.getDefaultConstructorVisibility;
|
||||
import static org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getBuiltIns;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
package org.jetbrains.kotlin.resolve.descriptorUtil
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.ENUM_VALUE_OF
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.ENUM_VALUE_OF
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.descriptors.ClassKind.*
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotated
|
||||
@@ -202,14 +202,14 @@ fun ValueParameterDescriptor.declaresOrInheritsDefaultValue(): Boolean {
|
||||
}
|
||||
|
||||
fun Annotated.isRepeatableAnnotation(): Boolean =
|
||||
annotations.findAnnotation(KotlinBuiltInsNames.FqNames.repeatable) != null
|
||||
annotations.findAnnotation(StandardNames.FqNames.repeatable) != null
|
||||
|
||||
fun Annotated.isDocumentedAnnotation(): Boolean =
|
||||
annotations.findAnnotation(KotlinBuiltInsNames.FqNames.mustBeDocumented) != null
|
||||
annotations.findAnnotation(StandardNames.FqNames.mustBeDocumented) != null
|
||||
|
||||
fun Annotated.getAnnotationRetention(): KotlinRetention? {
|
||||
val retentionArgumentValue =
|
||||
annotations.findAnnotation(KotlinBuiltInsNames.FqNames.retention)?.allValueArguments?.get(RETENTION_PARAMETER_NAME)
|
||||
annotations.findAnnotation(StandardNames.FqNames.retention)?.allValueArguments?.get(RETENTION_PARAMETER_NAME)
|
||||
as? EnumValue ?: return null
|
||||
|
||||
val retentionArgumentValueName = retentionArgumentValue.enumEntryName.asString()
|
||||
@@ -405,7 +405,7 @@ fun computeSealedSubclasses(sealedClass: ClassDescriptor): Collection<ClassDescr
|
||||
|
||||
fun DeclarationDescriptor.isPublishedApi(): Boolean {
|
||||
val descriptor = if (this is CallableMemberDescriptor) DescriptorUtils.getDirectMember(this) else this
|
||||
return descriptor.annotations.hasAnnotation(KotlinBuiltInsNames.FqNames.publishedApi)
|
||||
return descriptor.annotations.hasAnnotation(StandardNames.FqNames.publishedApi)
|
||||
}
|
||||
|
||||
fun DeclarationDescriptor.isAncestorOf(descriptor: DeclarationDescriptor, strict: Boolean): Boolean =
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.jetbrains.kotlin.resolve.constants
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations
|
||||
import org.jetbrains.kotlin.descriptors.findClassAcrossModuleDependencies
|
||||
@@ -102,7 +102,7 @@ fun createIntegerValueTypeConstant(
|
||||
}
|
||||
|
||||
fun hasUnsignedTypesInModuleDependencies(module: ModuleDescriptor): Boolean {
|
||||
return module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uInt) != null
|
||||
return module.findClassAcrossModuleDependencies(StandardNames.FqNames.uInt) != null
|
||||
}
|
||||
|
||||
class UnsignedErrorValueTypeConstant(
|
||||
|
||||
+5
-5
@@ -17,7 +17,7 @@
|
||||
package org.jetbrains.kotlin.resolve.constants
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
@@ -66,10 +66,10 @@ class IntegerValueTypeConstructor(
|
||||
}
|
||||
|
||||
private fun addUnsignedSuperTypes() {
|
||||
checkBoundsAndAddSuperType(value, module.unsignedType(KotlinBuiltInsNames.FqNames.uInt))
|
||||
checkBoundsAndAddSuperType(value, module.unsignedType(KotlinBuiltInsNames.FqNames.uByte))
|
||||
checkBoundsAndAddSuperType(value, module.unsignedType(KotlinBuiltInsNames.FqNames.uShort))
|
||||
supertypes.add(module.unsignedType(KotlinBuiltInsNames.FqNames.uLong))
|
||||
checkBoundsAndAddSuperType(value, module.unsignedType(StandardNames.FqNames.uInt))
|
||||
checkBoundsAndAddSuperType(value, module.unsignedType(StandardNames.FqNames.uByte))
|
||||
checkBoundsAndAddSuperType(value, module.unsignedType(StandardNames.FqNames.uShort))
|
||||
supertypes.add(module.unsignedType(StandardNames.FqNames.uLong))
|
||||
}
|
||||
|
||||
private fun checkBoundsAndAddSuperType(value: Long, kotlinType: KotlinType) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.resolve.constants
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.builtins.UnsignedTypes
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.findClassAcrossModuleDependencies
|
||||
@@ -42,16 +42,16 @@ internal fun KotlinType.maxValue(): Long {
|
||||
internal fun ModuleDescriptor.unsignedType(classId: ClassId): SimpleType = findClassAcrossModuleDependencies(classId)!!.defaultType
|
||||
|
||||
internal val ModuleDescriptor.uIntType: SimpleType
|
||||
get() = unsignedType(KotlinBuiltInsNames.FqNames.uInt)
|
||||
get() = unsignedType(StandardNames.FqNames.uInt)
|
||||
|
||||
internal val ModuleDescriptor.uLongType: SimpleType
|
||||
get() = unsignedType(KotlinBuiltInsNames.FqNames.uLong)
|
||||
get() = unsignedType(StandardNames.FqNames.uLong)
|
||||
|
||||
internal val ModuleDescriptor.uByteType: SimpleType
|
||||
get() = unsignedType(KotlinBuiltInsNames.FqNames.uByte)
|
||||
get() = unsignedType(StandardNames.FqNames.uByte)
|
||||
|
||||
internal val ModuleDescriptor.uShortType: SimpleType
|
||||
get() = unsignedType(KotlinBuiltInsNames.FqNames.uShort)
|
||||
get() = unsignedType(StandardNames.FqNames.uShort)
|
||||
|
||||
internal val ModuleDescriptor.allSignedLiteralTypes: Collection<KotlinType>
|
||||
get() = listOf(builtIns.intType, builtIns.longType, builtIns.byteType, builtIns.shortType)
|
||||
@@ -59,8 +59,8 @@ internal val ModuleDescriptor.allSignedLiteralTypes: Collection<KotlinType>
|
||||
internal val ModuleDescriptor.allUnsignedLiteralTypes: Collection<KotlinType>
|
||||
get() = if (hasUnsignedTypesInModuleDependencies(this)) {
|
||||
listOf(
|
||||
unsignedType(KotlinBuiltInsNames.FqNames.uInt), unsignedType(KotlinBuiltInsNames.FqNames.uLong),
|
||||
unsignedType(KotlinBuiltInsNames.FqNames.uByte), unsignedType(KotlinBuiltInsNames.FqNames.uShort)
|
||||
unsignedType(StandardNames.FqNames.uInt), unsignedType(StandardNames.FqNames.uLong),
|
||||
unsignedType(StandardNames.FqNames.uByte), unsignedType(StandardNames.FqNames.uShort)
|
||||
)
|
||||
} else {
|
||||
emptyList()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.jetbrains.kotlin.resolve.constants
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||
@@ -219,7 +219,7 @@ class KClassValue(value: Value) : ConstantValue<KClassValue.Value>(value) {
|
||||
// In JVM class file, we can't represent such literal properly, so we're writing java.lang.Object instead.
|
||||
// This has no effect on the compiler front-end or other back-ends, so we use kotlin.Any for simplicity here.
|
||||
// See LanguageFeature.ProhibitTypeParametersInClassLiteralsInAnnotationArguments
|
||||
KClassValue(ClassId.topLevel(KotlinBuiltInsNames.FqNames.any.toSafe()), 0)
|
||||
KClassValue(ClassId.topLevel(StandardNames.FqNames.any.toSafe()), 0)
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
@@ -259,7 +259,7 @@ class StringValue(value: String) : ConstantValue<String>(value) {
|
||||
|
||||
class UByteValue(byteValue: Byte) : UnsignedValueConstant<Byte>(byteValue) {
|
||||
override fun getType(module: ModuleDescriptor): KotlinType {
|
||||
return module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uByte)?.defaultType
|
||||
return module.findClassAcrossModuleDependencies(StandardNames.FqNames.uByte)?.defaultType
|
||||
?: ErrorUtils.createErrorType("Unsigned type UByte not found")
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ class UByteValue(byteValue: Byte) : UnsignedValueConstant<Byte>(byteValue) {
|
||||
|
||||
class UShortValue(shortValue: Short) : UnsignedValueConstant<Short>(shortValue) {
|
||||
override fun getType(module: ModuleDescriptor): KotlinType {
|
||||
return module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uShort)?.defaultType
|
||||
return module.findClassAcrossModuleDependencies(StandardNames.FqNames.uShort)?.defaultType
|
||||
?: ErrorUtils.createErrorType("Unsigned type UShort not found")
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ class UShortValue(shortValue: Short) : UnsignedValueConstant<Short>(shortValue)
|
||||
|
||||
class UIntValue(intValue: Int) : UnsignedValueConstant<Int>(intValue) {
|
||||
override fun getType(module: ModuleDescriptor): KotlinType {
|
||||
return module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uInt)?.defaultType
|
||||
return module.findClassAcrossModuleDependencies(StandardNames.FqNames.uInt)?.defaultType
|
||||
?: ErrorUtils.createErrorType("Unsigned type UInt not found")
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ class UIntValue(intValue: Int) : UnsignedValueConstant<Int>(intValue) {
|
||||
|
||||
class ULongValue(longValue: Long) : UnsignedValueConstant<Long>(longValue) {
|
||||
override fun getType(module: ModuleDescriptor): KotlinType {
|
||||
return module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uLong)?.defaultType
|
||||
return module.findClassAcrossModuleDependencies(StandardNames.FqNames.uLong)?.defaultType
|
||||
?: ErrorUtils.createErrorType("Unsigned type ULong not found")
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import kotlin.jvm.functions.Function1;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames;
|
||||
import org.jetbrains.kotlin.builtins.StandardNames;
|
||||
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.Annotations;
|
||||
import org.jetbrains.kotlin.descriptors.annotations.CompositeAnnotations;
|
||||
@@ -252,7 +252,7 @@ public class TypeSubstitutor implements TypeSubstitutorMarker {
|
||||
@Nullable TypeParameterDescriptor typeParameter,
|
||||
@NotNull TypeProjection originalProjection
|
||||
) {
|
||||
if (!originalType.getAnnotations().hasAnnotation(KotlinBuiltInsNames.FqNames.unsafeVariance)) return substituted;
|
||||
if (!originalType.getAnnotations().hasAnnotation(StandardNames.FqNames.unsafeVariance)) return substituted;
|
||||
|
||||
TypeConstructor constructor = substituted.getType().getConstructor();
|
||||
if (!(constructor instanceof NewCapturedTypeConstructor)) return substituted;
|
||||
@@ -278,11 +278,11 @@ public class TypeSubstitutor implements TypeSubstitutorMarker {
|
||||
|
||||
@NotNull
|
||||
private static Annotations filterOutUnsafeVariance(@NotNull Annotations annotations) {
|
||||
if (!annotations.hasAnnotation(KotlinBuiltInsNames.FqNames.unsafeVariance)) return annotations;
|
||||
if (!annotations.hasAnnotation(StandardNames.FqNames.unsafeVariance)) return annotations;
|
||||
return new FilteredAnnotations(annotations, new Function1<FqName, Boolean>() {
|
||||
@Override
|
||||
public Boolean invoke(@NotNull FqName name) {
|
||||
return !name.equals(KotlinBuiltInsNames.FqNames.unsafeVariance);
|
||||
return !name.equals(StandardNames.FqNames.unsafeVariance);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import kotlin.jvm.functions.Function1;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns;
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames;
|
||||
import org.jetbrains.kotlin.builtins.StandardNames;
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.ClassifierDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor;
|
||||
@@ -500,10 +500,10 @@ public class TypeUtils {
|
||||
return longType;
|
||||
}
|
||||
|
||||
KotlinType uIntType = findByFqName(supertypes, KotlinBuiltInsNames.FqNames.uIntFqName);
|
||||
KotlinType uIntType = findByFqName(supertypes, StandardNames.FqNames.uIntFqName);
|
||||
if (uIntType != null) return uIntType;
|
||||
|
||||
KotlinType uLongType = findByFqName(supertypes, KotlinBuiltInsNames.FqNames.uLongFqName);
|
||||
KotlinType uLongType = findByFqName(supertypes, StandardNames.FqNames.uLongFqName);
|
||||
if (uLongType != null) return uLongType;
|
||||
|
||||
return null;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.types.checker
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames.FqNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames.FqNames
|
||||
import org.jetbrains.kotlin.builtins.PrimitiveType
|
||||
import org.jetbrains.kotlin.builtins.isBuiltinFunctionalTypeOrSubtype
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.serialization.deserialization
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.metadata.deserialization.TypeTable
|
||||
import org.jetbrains.kotlin.metadata.deserialization.VersionRequirementTable
|
||||
@@ -83,7 +83,7 @@ class ClassDeserializer(private val components: DeserializationComponents) {
|
||||
* but the metadata is still serialized for kotlin-reflect 1.0 to work (see BuiltInsSerializer.kt).
|
||||
*/
|
||||
val BLACK_LIST = setOf(
|
||||
ClassId.topLevel(KotlinBuiltInsNames.FqNames.cloneable.toSafe())
|
||||
ClassId.topLevel(StandardNames.FqNames.cloneable.toSafe())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.serialization.deserialization.builtins
|
||||
|
||||
import org.jetbrains.kotlin.builtins.BuiltInsLoader
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.NotFoundClasses
|
||||
import org.jetbrains.kotlin.descriptors.PackageFragmentProvider
|
||||
@@ -35,7 +35,7 @@ class BuiltInsLoaderImpl : BuiltInsLoader {
|
||||
return createBuiltInPackageFragmentProvider(
|
||||
storageManager,
|
||||
builtInsModule,
|
||||
KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAMES,
|
||||
StandardNames.BUILT_INS_PACKAGE_FQ_NAMES,
|
||||
classDescriptorFactories,
|
||||
platformDependentDeclarationFilter,
|
||||
additionalClassPartsProvider,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package kotlin.reflect.jvm.internal
|
||||
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.builtins.PrimitiveType
|
||||
import org.jetbrains.kotlin.builtins.jvm.CloneableClassScope
|
||||
import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap
|
||||
@@ -259,15 +259,15 @@ internal object RuntimeTypeMapper {
|
||||
fun mapJvmClassToKotlinClassId(klass: Class<*>): ClassId {
|
||||
if (klass.isArray) {
|
||||
klass.componentType.primitiveType?.let {
|
||||
return ClassId(KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME, it.arrayTypeName)
|
||||
return ClassId(StandardNames.BUILT_INS_PACKAGE_FQ_NAME, it.arrayTypeName)
|
||||
}
|
||||
return ClassId.topLevel(KotlinBuiltInsNames.FqNames.array.toSafe())
|
||||
return ClassId.topLevel(StandardNames.FqNames.array.toSafe())
|
||||
}
|
||||
|
||||
if (klass == Void.TYPE) return JAVA_LANG_VOID
|
||||
|
||||
klass.primitiveType?.let {
|
||||
return ClassId(KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME, it.typeName)
|
||||
return ClassId(StandardNames.BUILT_INS_PACKAGE_FQ_NAME, it.typeName)
|
||||
}
|
||||
|
||||
val classId = klass.classId
|
||||
|
||||
Reference in New Issue
Block a user