toString() method for data classes and fake implementation for hashCode/equals

This commit is contained in:
Alex Tkachman
2012-09-16 15:56:48 +03:00
parent e317764a88
commit 58af365eb2
13 changed files with 236 additions and 40 deletions
@@ -0,0 +1,7 @@
data class A(var x: Int, y: Int, val z: Int?)
fun box(): String {
val a = A(1, 2, null)
if("$a" != "A{x=1, z=null}") return "$a"
return "OK"
}