Youssef Shoaib [MOD]
03/16/2023, 10:28 AMcomponentN functions? This for instance throws error "Conflicting overloads: public final operator fun component1(): String defined in Foo":
data class Foo(val bar: Int) {
operator fun component1() = bar.toString()
}Sam
03/16/2023, 10:34 AM• Providing explicit implementations for theBut that restriction only applies to data classes. You can define your ownandcomponentN()functions is not allowed.copy()
componentN functions for any other class.phldavies
03/16/2023, 10:35 AMcomponent1()