changed behavior of componentX/toString/hashCode and equals to work naturally with overriden properties
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
open data class A(open val x: String)
|
||||
|
||||
class B : A("OK") {
|
||||
override val x: String = "Fail"
|
||||
class B : A("Fail") {
|
||||
override val x: String = "OK"
|
||||
}
|
||||
|
||||
fun foo(a: A) = a.component1()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
open data class A(open val x: String)
|
||||
|
||||
class B : A("OK") {
|
||||
override val x: String = "Fail"
|
||||
class B : A("Fail") {
|
||||
override val x: String = "OK"
|
||||
}
|
||||
|
||||
fun foo(a: A) = a
|
||||
|
||||
Reference in New Issue
Block a user