Move properties of enum class object to the enum class
Similar to how it's done for usual classes
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user