[JVM IR] Use reference equality when comparing enums.
This commit is contained in:
committed by
Alexander Udalov
parent
a732e8f5fe
commit
368b0d9b0b
+1
-1
@@ -6,7 +6,7 @@ enum class Bar {
|
||||
fun isOne(i: Bar) = i == Bar.ONE
|
||||
|
||||
fun box(): String {
|
||||
return when (isOne(Bar.ONE) && !isOne(Bar.TWO)) {
|
||||
return when (isOne(Bar.ONE) && !isOne(Bar.TWO) && Bar.ONE != Bar.TWO) {
|
||||
true -> "OK"
|
||||
else -> "Failure"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user