Move properties of enum class object to the enum class

Similar to how it's done for usual classes
This commit is contained in:
Alexander Udalov
2014-09-11 16:01:03 +04:00
parent 81004889eb
commit e0ee890486
5 changed files with 60 additions and 9 deletions
@@ -11,7 +11,7 @@ enum class Game {
fun box(): String {
if (Game.foo() != Game.ROCK) return "Fail 1"
// TODO: fix initialization order and uncomment
// TODO: fix initialization order and uncomment (KT-5761)
// if (Game.bar != Game.PAPER) return "Fail 2: ${Game.bar}"
if (Game.values().size != 3) return "Fail 3"
if (Game.valueOf("SCISSORS") != Game.SCISSORS) return "Fail 4"