Files
kotlin-fork/compiler/testData/diagnostics/tests/enum/ifEnumEntry.kt
T
Mikhail Zarechenskiy 76b0b785c5 Prohibit to use enum entry as a type
#KT-14179 Fixed
2017-01-09 18:30:32 +03:00

6 lines
160 B
Kotlin
Vendored

enum class MyEnum {
FIRST,
SECOND
}
fun foo(me: MyEnum): Boolean = if (me is <!IS_ENUM_ENTRY!>MyEnum.<!ENUM_ENTRY_AS_TYPE!>FIRST<!><!>) true else false