Files
kotlin/compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructor.kt
Ting-Yuan Huang 74e8c7c1c5 JVM_IR: generate default constructor
Quoted from https://kotlinlang.org/docs/reference/classes.html

"On the JVM, if all of the parameters of the primary constructor have
 default values, the compiler will generate an additional parameterless
 constructor which will use the default values. This makes it easier to
 use Kotlin with libraries such as Jackson or JPA that create class
 instances through parameterless constructors."
2019-05-30 18:53:27 +02:00

4 lines
38 B
Kotlin
Vendored

package test
class A(val a: Int = 1)