[JVM IR] Use reference equality when comparing enums.
This commit is contained in:
committed by
Alexander Udalov
parent
a732e8f5fe
commit
368b0d9b0b
+14
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
enum class Bar {
|
||||
ONE {
|
||||
override fun toString(): String {
|
||||
if (this != TWO && this == ONE) return "OK" else return "FAIL"
|
||||
}
|
||||
},
|
||||
TWO;
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return Bar.ONE.toString()
|
||||
}
|
||||
Reference in New Issue
Block a user