From 8cc4db39d26a49b3c69eba09a08180038857ee07 Mon Sep 17 00:00:00 2001 From: Ivan Kylchik Date: Tue, 15 Aug 2023 16:26:04 +0200 Subject: [PATCH] [Native] Drop `copy` from `IrUtils2` It is not used anywhere --- .../src/org/jetbrains/kotlin/ir/util/IrUtils2.kt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt index e7b5acce860..d39eeaa28bc 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils2.kt @@ -149,22 +149,6 @@ fun IrBuilderWithScope.irCatch(type: IrType) = } ) -fun IrValueParameter.copy(newDescriptor: ParameterDescriptor): IrValueParameter { - // Aggressive use of IrBasedDescriptors during deserialization - // makes these types different. - // Let's hope they not really used afterwards. - //assert(this.descriptor.type == newDescriptor.type) { - // "type1 = ${this.descriptor.type} != type2 = ${newDescriptor.type}" - //} - - return IrValueParameterImpl( - startOffset, endOffset, IrDeclarationOrigin.DEFINED, IrValueParameterSymbolImpl(newDescriptor), - newDescriptor.name, newDescriptor.indexOrMinusOne, type, varargElementType, - newDescriptor.isCrossinline, newDescriptor.isNoinline, - isHidden = false, isAssignable = false - ) -} - fun IrClass.defaultOrNullableType(hasQuestionMark: Boolean) = if (hasQuestionMark) this.defaultType.makeNullable() else this.defaultType