Prohibit to use enum entry as a type
#KT-14179 Fixed
This commit is contained in:
@@ -4,8 +4,8 @@ enum class MyEnum {
|
||||
|
||||
fun foo(x: MyEnum): Int {
|
||||
return when (x) {
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.A<!> -> 1
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.B<!> -> 2
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.C<!> -> 3
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.<!ENUM_ENTRY_AS_TYPE!>A<!><!> -> 1
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.<!ENUM_ENTRY_AS_TYPE!>B<!><!> -> 2
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.<!ENUM_ENTRY_AS_TYPE!>C<!><!> -> 3
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ enum class MyEnum {
|
||||
fun foo(x: MyEnum): Int {
|
||||
return when (x) {
|
||||
MyEnum.A -> 1
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.B<!> -> 2
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.C<!> -> 3
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.<!ENUM_ENTRY_AS_TYPE!>B<!><!> -> 2
|
||||
is <!IS_ENUM_ENTRY!>MyEnum.<!ENUM_ENTRY_AS_TYPE!>C<!><!> -> 3
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user