Implemented enumValueOf<>() and enumValues<>()

This commit is contained in:
Igor Chevdar
2017-03-29 12:36:15 +03:00
parent b7695b4f20
commit d31a770e70
2 changed files with 100 additions and 31 deletions
+8
View File
@@ -31,3 +31,11 @@ public abstract class Enum<E: Enum<E>>(public val name: String, public val ordin
return name
}
}
fun <T: Enum<T>> enumValueOf(name: String): T {
throw Exception("Call to this function should've been lowered")
}
fun <T: Enum<T>> enumValues(): Array<T> {
throw Exception("Call to this function should've been lowered")
}