Allow secondary constructors without body

#KT-6967 Fixed
This commit is contained in:
Denis Zharkov
2015-03-20 12:59:05 +03:00
parent 3f0541924f
commit 01e5ee718f
54 changed files with 390 additions and 153 deletions
@@ -1,13 +1,13 @@
open class A(val x: String = "abc", val y: String = "efg") {
constructor(x: String, y: String, z: Int): this(x, y + "#" + z.toString()) {}
constructor(x: String, y: String, z: Int): this(x, y + "#" + z.toString())
override fun toString() = "$x#$y"
}
class B : A {
constructor(x: String, y: String, z: Int): super(x, y + z.toString()) {}
constructor(x: String = "xyz", y: String = "123") : super(x, y) {}
constructor(x: Double): super(x.toString()) {}
constructor(x: String, y: String, z: Int): super(x, y + z.toString())
constructor(x: String = "xyz", y: String = "123") : super(x, y)
constructor(x: Double): super(x.toString())
}
fun box(): String {