Files
kotlin-fork/compiler/testData/codegen/dataClasses/hashcode/genericNull.kt
T
Alexander Udalov 8697adb28a Fix generic data class hashCode for null
Null may come from everywhere, so we always check for it (when the property's
type is not primitive)
2013-02-06 17:54:26 +04:00

8 lines
138 B
Kotlin

data class A<T>(val t: T)
fun box(): String {
val h = A<String?>(null).hashCode()
if (h != 0) return "Fail $h"
return "OK"
}