Files
kotlin/compiler/testData/codegen/box/package/checkCast.kt
Alexander Udalov ec30d52978 Delete Hashable, pull up its members to Any
Extensions on nullable types remain in Library.kt

 #KT-1741 Obsolete
 #KT-2805 Obsolete
 #KT-1365 Fixed
 #KT-4517 In Progress
2014-03-02 19:54:08 +04:00

16 lines
263 B
Kotlin

class C(val x: Int) {
override fun equals(rhs: Any?): Boolean {
if (rhs is C) {
val rhsC = rhs as C
return rhsC.x == x
}
return false
}
}
fun box(): String {
val c1 = C(10)
val c2 = C(10)
return if (c1 == c2) "OK" else "fail"
}