Fix message text for INCOMPATIBLE_ENUM_COMPARISON
^KT-28516 Fixed
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// !DIAGNOSTICS_NUMBER: 2
|
||||
// !DIAGNOSTICS: INCOMPATIBLE_ENUM_COMPARISON
|
||||
// !MESSAGE_TYPE: TEXT
|
||||
|
||||
enum class E1 {
|
||||
A, B
|
||||
}
|
||||
|
||||
enum class E2 {
|
||||
A, B
|
||||
}
|
||||
|
||||
fun foo1(e1: E1, e2: E2) {
|
||||
e1 == e2
|
||||
}
|
||||
|
||||
fun foo2(e1: E1, e2: E2) {
|
||||
when (e1) {
|
||||
E2.A -> {}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- incompatibleEnums1 -->
|
||||
Comparison of incompatible enums 'E1' and 'E2' is always unsuccessful
|
||||
@@ -0,0 +1,2 @@
|
||||
<!-- incompatibleEnums2 -->
|
||||
Comparison of incompatible enums 'E1' and 'E2' is always unsuccessful
|
||||
Reference in New Issue
Block a user