hashCode generation for data classes

This commit is contained in:
Alex Tkachman
2012-09-17 15:52:23 +03:00
parent d825fb25a0
commit 8c823486d7
14 changed files with 264 additions and 37 deletions
@@ -0,0 +1,7 @@
data class A(val a: Float)
fun box() : String {
val v1 = A(-10.toFloat()).hashCode()
val v2 = (-10.toFloat() as Float?)!!.hashCode()
return if( v1 == v2 ) "OK" else "$v1 $v2"
}