Stdlib rename: 'name' and 'ordinal' are now properties in Enum, same name functions are deprecated
This commit is contained in:
+1
-1
@@ -3,4 +3,4 @@ enum class State {
|
||||
K
|
||||
}
|
||||
|
||||
fun box() = "${State.O.name()}${State.K.name()}"
|
||||
fun box() = "${State.O.name}${State.K.name}"
|
||||
|
||||
+1
-1
@@ -5,4 +5,4 @@ enum class State {
|
||||
_3
|
||||
}
|
||||
|
||||
fun box() = if(State._0.ordinal()==0 && State._1.ordinal() == 1 && State._2.ordinal() == 2 && State._3.ordinal() == 3) "OK" else "fail"
|
||||
fun box() = if(State._0.ordinal == 0 && State._1.ordinal == 1 && State._2.ordinal == 2 && State._3.ordinal == 3) "OK" else "fail"
|
||||
|
||||
Reference in New Issue
Block a user