Files
kotlin-fork/compiler/testData/codegen/box/jvmOverloads/primaryConstructorWithAllDefaults.kt
T
pyos 6a21285aed JVM_IR: do not generate two nullary constructors
when the primary constructor with @JvmOverloads has default values for
all arguments.
2019-06-24 14:58:45 +02:00

13 lines
268 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_RUNTIME
class C @kotlin.jvm.JvmOverloads constructor(s1: String = "O", s2: String = "K") {
public val status: String = s1 + s2
}
fun box(): String {
val c = (C::class.java.getConstructor().newInstance())
return c.status
}