Drop identityEquals from builtins, compiler and tests.

This commit is contained in:
Ilya Gorbunov
2016-01-21 19:40:46 +03:00
parent f5f5a2dcc1
commit 4d5ec9be3f
44 changed files with 66 additions and 185 deletions

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -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
}