Use enum names without prefix in Kotlin?

前端 未结 0 984
灰色年华
灰色年华 2020-12-31 03:02

Is it possible to use enum name without its prefix?

enum class Color { red, blue, green }

data class Shape(val color: Color)

fun main() {
    println(Shape(         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题