Files
kotlin-fork/kotlin-native/backend.native/tests/objcexport/dataClassComponentMethods.kt
T
Svyatoslav Scherbina ad72545647 ObjCExport: deprecate exporting data class componentN methods to Obj-C
The Objective-C methods for Kotlin data class componentN methods
shouldn't have been generated in the first place -- the corresponding
Kotlin methods are required to make the destructuring work in Kotlin,
and don't help in Objective-C or Swift.

Calling them manually from Objective-C or Swift doesn't make much sense.
So now we deprecate this, in order to remove these methods from
Objective-C header completely later.

^KT-42641
^KT-49516 Fixed
2022-02-11 06:55:47 +00:00

17 lines
389 B
Kotlin

/*
* Copyright 2010-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package dataClassComponentMethods
data class DataClassWithComponentMethods(val x: Int, val y: Int)
class RegularClassWithComponentMethods {
fun component1() = 3
fun component3() = 4
}
fun component1() = 5
fun component4() = 6