Delete Hashable, pull up its members to Any

Extensions on nullable types remain in Library.kt

 #KT-1741 Obsolete
 #KT-2805 Obsolete
 #KT-1365 Fixed
 #KT-4517 In Progress
This commit is contained in:
Alexander Udalov
2014-02-04 19:54:06 +04:00
parent 9efdd136ba
commit ec30d52978
46 changed files with 210 additions and 416 deletions
@@ -1,7 +1,7 @@
public class MPair<out A> (
public val first: A
) {
fun equals(o: Any?): Boolean {
override fun equals(o: Any?): Boolean {
val t = o as MPair<*>
return first == t.first
}
@@ -4,7 +4,7 @@ class T4(
val c3: Boolean,
val c4: String
) {
fun equals(o: Any?): Boolean {
override fun equals(o: Any?): Boolean {
if (o !is T4) return false;
return c1 == o.c1 &&
c2 == o.c2 &&
@@ -1,5 +1,5 @@
class C(val x: Int) {
fun equals(rhs: Any?): Boolean {
override fun equals(rhs: Any?): Boolean {
if (rhs is C) {
val rhsC = rhs as C
return rhsC.x == x
@@ -1,6 +0,0 @@
fun foo(): Hashable = 1
fun box(): String {
if (foo() == 1) return "OK"
return "Fail"
}