Files
kotlin-fork/compiler/testData/diagnostics/tests/enum/isEnumEntry.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
139 B
Kotlin
Vendored

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