mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Drop identityEquals from builtins, compiler and tests.
This commit is contained in:
@@ -6,6 +6,6 @@ fun box(): String {
|
||||
val a = A(42)
|
||||
val b = a.clone()
|
||||
if (b != a) return "Fail equals"
|
||||
if (b.identityEquals(a)) return "Fail identity"
|
||||
if (b === a) return "Fail identity"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ fun box(): String {
|
||||
val a = A(42)
|
||||
val b = a.clone()
|
||||
if (a != b) return "Fail equals"
|
||||
if (a.identityEquals(b)) return "Fail identity"
|
||||
if (a === b) return "Fail identity"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ fun box(): String {
|
||||
val a = A(42)
|
||||
val b = a.clone()
|
||||
if (a == b) return "Fail: $a == $b"
|
||||
if (a.identityEquals(b)) return "Fail: $a identityEquals $b"
|
||||
if (a === b) return "Fail: $a === $b"
|
||||
if (b.x != 239) return "Fail: b.x = ${b.x}"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -7,6 +7,6 @@ fun box(): String {
|
||||
a.add("prosper")
|
||||
val b = a.clone()
|
||||
if (a != b) return "Fail equals"
|
||||
if (a.identityEquals(b)) return "Fail identity"
|
||||
if (a === b) return "Fail identity"
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ fun box(): String {
|
||||
|
||||
if (c.s != d.s) return "Fail s: ${d.s}"
|
||||
if (c.l != d.l) return "Fail l: ${d.l}"
|
||||
if (c.l.identityEquals(d.l)) return "Fail list identity"
|
||||
if (c.identityEquals(d)) return "Fail identity"
|
||||
if (c.l === d.l) return "Fail list identity"
|
||||
if (c === d) return "Fail identity"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ fun box(): String {
|
||||
val a = A("OK")
|
||||
val b = a.externalClone()
|
||||
if (a != b) return "Fail equals"
|
||||
if (a.identityEquals(b)) return "Fail identity"
|
||||
if (a === b) return "Fail identity"
|
||||
return b.s
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user