Files
kotlin-fork/compiler/testData/psi/EnumShortNoCommas.kt
T
Mikhail Glukhikh 1a312140e9 New enum syntax: Short constructor syntax introduced for entries, optional commas between entries, semicolon after entries. #KT-7605 Fixed.
Grammar changed accordingly.
Semicolons prohibited after an entry except the last one.
Only one initializer is allowed per entry.
EnumReferenceExpression AST node introduced.
Some tests fixed, a pair of new tests written. Kotlin code inside project fixed.
Formatter and intendation tests fixed accordingly.
Stub version is incremented.
2015-05-15 16:13:32 +03:00

7 lines
184 B
Kotlin
Vendored

// NB: this test uses deprecated syntax
// Delete it when this syntax is no longer supported
enum class Color(val rgb : Int) {
RED(0xFF000)
GREEN(0x00FF00)
BLUE(0x0000FF)
}