[JVM IR] Use reference equality when comparing enums.

This commit is contained in:
Mark Punzalan
2020-03-06 01:35:05 -08:00
committed by Alexander Udalov
parent a732e8f5fe
commit 368b0d9b0b
14 changed files with 82 additions and 7 deletions
+1 -1
View File
@@ -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"
}