Fix NoSuchMethodError for data classes with private parameters
Introduced in a07909bb52
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
data class D(private val x: Long, private val y: Char)
|
||||
|
||||
fun box(): String {
|
||||
val d1 = D(42L, 'a')
|
||||
val d2 = D(42L, 'a')
|
||||
if (d1 != d2) return "Fail equals"
|
||||
if (d1.hashCode() != d2.hashCode()) return "Fail hashCode"
|
||||
if (d1.toString() != d2.toString()) return "Fail toString"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user