changed behavior of componentX/toString/hashCode and equals to work naturally with overriden properties

This commit is contained in:
Alex Tkachman
2012-09-18 18:08:16 +03:00
parent ae93018546
commit 7b066faa9f
3 changed files with 12 additions and 15 deletions
@@ -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