Fix wrong checkcast for === on objects
#KT-6747 Fixed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
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")
|
||||
Reference in New Issue
Block a user