Fix wrong checkcast for === on objects

#KT-6747 Fixed
This commit is contained in:
Alexander Udalov
2015-02-11 03:07:57 +03:00
parent 37ec103d6a
commit a280599969
5 changed files with 33 additions and 12 deletions
@@ -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")