Files
kotlin/compiler/testData/codegen/box/enum/inclassobj.kt
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

16 lines
390 B
Kotlin
Vendored

fun box() = if(Context.operatingSystemType == Context.Companion.OsType.OTHER) "OK" else "fail"
public class Context
{
companion object
{
public enum class OsType {
LINUX,
OTHER;
}
public val operatingSystemType: OsType
get() = OsType.OTHER
}
}