Files
kotlin/compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt
2018-06-28 12:26:41 +02:00

11 lines
275 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
class A(value: Int = 1)
fun box(): String {
val constructors = A::class.java.getConstructors().filter { !it.isSynthetic() }
return if (constructors.size == 2) "OK" else constructors.size.toString()
}