Files
kotlin-fork/compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt
T
Alexander Udalov a280599969 Fix wrong checkcast for === on objects
#KT-6747 Fixed
2015-02-11 18:10:35 +03:00

11 lines
253 B
Kotlin

class Test {
fun check(a: Any?): String {
if (this === a) return "Fail 1"
if (!(this !== a)) return "Fail 2"
if (this.identityEquals(a)) return "Fail 3"
return "OK"
}
}
fun box(): String = Test().check("String")