[JS IR BE] Support Enum::values
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
|
||||
package kotlin
|
||||
|
||||
public class Enum<T : Enum<T>>(val name: String, val ordinal: Int) : Comparable<Enum<T>> {
|
||||
public class Enum<E : Enum<E>>(val name: String, val ordinal: Int) : Comparable<E> {
|
||||
|
||||
override fun compareTo(other: Enum<T>) = ordinal.compareTo(other.ordinal)
|
||||
override fun compareTo(other: E) = ordinal.compareTo(other.ordinal)
|
||||
|
||||
override fun equals(other: Any?) = this === other
|
||||
|
||||
|
||||
@@ -85,5 +85,4 @@ fun getNumberHashCode(obj: dynamic) = js("""
|
||||
}
|
||||
""").unsafeCast<Int>()
|
||||
|
||||
// TODO: Use getObjectHashCode instead
|
||||
fun identityHashCode(obj: dynamic): Int = hashCode(obj)
|
||||
fun identityHashCode(obj: dynamic): Int = getObjectHashCode(obj)
|
||||
Reference in New Issue
Block a user