Files
kotlin-fork/compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt
T
Denis Zharkov 01e5ee718f Allow secondary constructors without body
#KT-6967 Fixed
2015-03-27 16:09:40 +03:00

18 lines
205 B
Kotlin

trait A {
fun foo(): String
}
class B : A {
override fun foo() = "OK"
}
val global = B()
class C(x: Int) : A by global {
constructor(): this(1)
}
fun box(): String {
return C().foo()
}