Rename KotlinBuiltInsNames to StandardNames

This commit is contained in:
Dmitriy Novozhilov
2020-08-19 12:32:07 +03:00
parent d032fdfc44
commit a764732020
184 changed files with 643 additions and 647 deletions
@@ -5,7 +5,7 @@
package org.jetbrains.kotlin.resolve.calls.components
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
import org.jetbrains.kotlin.builtins.StandardNames
import org.jetbrains.kotlin.builtins.getReceiverTypeFromFunctionType
import org.jetbrains.kotlin.builtins.getValueParameterTypesFromFunctionType
import org.jetbrains.kotlin.builtins.isBuiltinFunctionalType
@@ -130,7 +130,7 @@ class PostponedArgumentsAnalyzer(
val convertedAnnotations = lambda.expectedType?.annotations?.let { annotations ->
if (receiver != null || expectedReceiver == null) annotations
else FilteredAnnotations(annotations, true) { it != KotlinBuiltInsNames.FqNames.extensionFunctionType }
else FilteredAnnotations(annotations, true) { it != StandardNames.FqNames.extensionFunctionType }
}
val returnArgumentsAnalysisResult = resolutionCallbacks.analyzeAndGetLambdaReturnArguments(
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.resolve.calls.results
import gnu.trove.THashSet
import gnu.trove.TObjectHashingStrategy
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.*
import org.jetbrains.kotlin.descriptors.synthetic.SyntheticMemberDescriptor
@@ -310,10 +310,10 @@ open class OverloadingConflictResolver<C : Any>(
val isGeneralUnsigned = UnsignedTypes.isUnsignedType(general)
return when {
isSpecificUnsigned && isGeneralUnsigned -> {
val uLong = module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uLong)?.defaultType ?: return false
val uInt = module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uInt)?.defaultType ?: return false
val uByte = module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uByte)?.defaultType ?: return false
val uShort = module.findClassAcrossModuleDependencies(KotlinBuiltInsNames.FqNames.uShort)?.defaultType ?: return false
val uLong = module.findClassAcrossModuleDependencies(StandardNames.FqNames.uLong)?.defaultType ?: return false
val uInt = module.findClassAcrossModuleDependencies(StandardNames.FqNames.uInt)?.defaultType ?: return false
val uByte = module.findClassAcrossModuleDependencies(StandardNames.FqNames.uByte)?.defaultType ?: return false
val uShort = module.findClassAcrossModuleDependencies(StandardNames.FqNames.uShort)?.defaultType ?: return false
isNonSubtypeNotLessSpecific(specific, general, _double, _float, uLong, uInt, uByte, uShort)
}
@@ -16,7 +16,7 @@
package org.jetbrains.kotlin.resolve.calls.util
import org.jetbrains.kotlin.builtins.KotlinBuiltInsNames
import org.jetbrains.kotlin.builtins.StandardNames
import org.jetbrains.kotlin.config.LanguageVersion
import org.jetbrains.kotlin.descriptors.CallableDescriptor
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor
@@ -24,9 +24,9 @@ import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.resolve.SINCE_KOTLIN_FQ_NAME
private val kotlin: FqName = KotlinBuiltInsNames.BUILT_INS_PACKAGE_FQ_NAME
private val kotlinText: FqName = KotlinBuiltInsNames.TEXT_PACKAGE_FQ_NAME
private val kotlinCollections: FqName = KotlinBuiltInsNames.COLLECTIONS_PACKAGE_FQ_NAME
private val kotlin: FqName = StandardNames.BUILT_INS_PACKAGE_FQ_NAME
private val kotlinText: FqName = StandardNames.TEXT_PACKAGE_FQ_NAME
private val kotlinCollections: FqName = StandardNames.COLLECTIONS_PACKAGE_FQ_NAME
private val kotlinStreams: FqName = kotlin.child(Name.identifier("streams"))
private val use: Name = Name.identifier("use")
@@ -43,7 +43,7 @@ private val remove: Name = Name.identifier("remove")
fun CallableDescriptor.isLowPriorityFromStdlibJre7Or8(): Boolean {
val containingPackage = containingDeclaration as? PackageFragmentDescriptor ?: return false
val packageFqName = containingPackage.fqName
if (!packageFqName.startsWith(KotlinBuiltInsNames.BUILT_INS_PACKAGE_NAME)) return false
if (!packageFqName.startsWith(StandardNames.BUILT_INS_PACKAGE_NAME)) return false
val isFromStdlibJre7Or8 =
packageFqName == kotlin && name == use ||