Files
kotlin-fork/compiler/testData/codegen/box/jvmName/functionWithDefault.kt
T
2019-11-19 11:00:10 +03:00

13 lines
258 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
@JvmName("bar")
fun foo(x: String = (object {}).javaClass.enclosingMethod.name) = x
fun box(): String {
val f = foo()
if (f != "bar\$default") return "Fail: $f"
return "OK"
}