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,13 +1,5 @@
class A() {
fun equals(<!UNUSED_PARAMETER!>a<!> : Any?) : Boolean = false
}
class B() {
fun equals(<!UNUSED_PARAMETER!>a<!> : Any?) : Boolean? = false
}
class C() {
fun equals(<!UNUSED_PARAMETER!>a<!> : Any?) : Int = 0
override fun equals(other : Any?) : Boolean = false
}
fun f(): Unit {
@@ -22,8 +14,6 @@ fun f(): Unit {
x != 1
<!EQUALITY_NOT_APPLICABLE!>A() == 1<!>
B() <!RESULT_TYPE_MISMATCH!>==<!> 1
C() <!RESULT_TYPE_MISMATCH!>==<!> 1
<!EQUALITY_NOT_APPLICABLE!>x === "1"<!>
<!EQUALITY_NOT_APPLICABLE!>x !== "1"<!>
@@ -1 +1 @@
fun f(a: MutableList<out Number>) = a is MutableList<out Hashable>
fun f(a: MutableList<out Number>) = a is MutableList<out Any>
@@ -1 +1 @@
fun f(a: List<Number>) = a is List<Hashable>
fun f(a: List<Number>) = a is List<Any>
@@ -1 +1 @@
fun f(a: List<Hashable>) = a is <!CANNOT_CHECK_FOR_ERASED!>List<Number><!>
fun f(a: List<Any>) = a is <!CANNOT_CHECK_FOR_ERASED!>List<Number><!>
@@ -15,7 +15,7 @@ public class Y extends X<A> {
// FILE: test.kt
fun main() {
Y().foo()<!UNSAFE_CALL!>.<!>hashCode()
Y().foo()<!UNSAFE_CALL!>.<!>wait()
Y().bar(null)
}
@@ -1,6 +1,6 @@
// No supertype at all
class A1 {
fun test() {
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>.equals(null) // Call to an extension function
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>.identityEquals(null) // Call to an extension function
}
}