45b89de9f4
There is no need to create honest object in case of such simple calculation. Furthermore, it can be harmful if enum class has non-constant initializer or property. #KT-53480 Fixed
15 lines
205 B
Kotlin
Vendored
15 lines
205 B
Kotlin
Vendored
// TARGET_BACKEND: JVM_IR
|
|
// FILE: J.java
|
|
public class J {
|
|
public static int f() { return 0; }
|
|
}
|
|
|
|
// FILE: Main.kt
|
|
enum class A {
|
|
OK;
|
|
val x = J.f()
|
|
}
|
|
|
|
fun box(): String {
|
|
return A.OK.name
|
|
} |