Add hashCode, equals and toString methods from String in builtin map

This commit is contained in:
Ivan Kylchik
2020-03-26 17:35:52 +03:00
parent 82acf7deb6
commit 900e78b39b
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ private fun getOperationMap(argumentsCount: Int): MutableMap<CallableDescriptor,
fun CallableDescriptor.isCompileTime(classDescriptor: ClassDescriptor): Boolean {
val thisIsCompileTime = this.annotations.hasAnnotation(compileTimeAnnotation)
val classIsCompileTime = classDescriptor.annotations.hasAnnotation(compileTimeAnnotation)
val isPrimitive = KotlinBuiltIns.isPrimitiveClass(classDescriptor)
val isPrimitive = KotlinBuiltIns.isPrimitiveClass(classDescriptor) || KotlinBuiltIns.isString(classDescriptor.defaultType)
val isFakeOverridden = (this as? FunctionDescriptor)?.kind == CallableMemberDescriptor.Kind.FAKE_OVERRIDE
return when {
isPrimitive -> thisIsCompileTime || classIsCompileTime