JS: support enums in flat JS structure

This commit is contained in:
Alexey Andreev
2016-10-19 13:15:59 +03:00
parent 54925e7f83
commit 06476402a2
7 changed files with 198 additions and 33 deletions
+4
View File
@@ -28,6 +28,10 @@ class Enum<T : Enum<T>> : Comparable<Enum<T>> {
override fun compareTo(other: Enum<T>) = ordinal.compareTo(other.ordinal)
override fun equals(other: Any?) = this === other
override fun hashCode(): Int = js("Kotlin.identityHashCode(this)")
override fun toString() = name
}