Andreas Sinz
03/10/2018, 4:32 PMdata class Foo private constructor (val a: Int, val b: Int)
fun Foo(a: Int, b: Int) = ...
Shawn
03/10/2018, 4:40 PMAndreas Sinz
03/10/2018, 4:41 PMShawn
03/10/2018, 4:43 PMAndreas Sinz
03/10/2018, 4:49 PMcompanion object
with operator fun invoke
Shawn
03/10/2018, 4:59 PMAndreas Sinz
03/10/2018, 5:00 PMcopy
serg
03/10/2018, 5:32 PMShawn
03/10/2018, 5:33 PMAndreas Sinz
03/10/2018, 6:10 PMIf there are explicit implementations of equals(), hashCode() or toString() in the data class body or final implementations in a superclass, then these functions are not generated, and the existing implementations are used
Deriving a data class from a type that already has a copy(...) function with a matching signature is deprecated in Kotlin 1.2 and will be prohibited in Kotlin 1.3.
copy()
or componentN()
😕Shawn
03/10/2018, 6:12 PMAndreas Sinz
03/10/2018, 6:13 PMserg
03/11/2018, 12:15 PMcopy()
method.
I think it would make sense to give a finer grain control over generated methods.