Control flow changes for secondary constructors

This commit is contained in:
Denis Zharkov
2015-03-10 19:42:45 +03:00
parent 61ae694be4
commit 7f20c4a237
39 changed files with 1785 additions and 30 deletions
@@ -0,0 +1,33 @@
open class B(x: Int)
class A : B {
val x: Int
var y: Int
val z: Int
val v = -1
constructor(): super(11) {
x = 1
y = 2
}
constructor(a: Int, b: Int = 3): super(b) {
x = a
y = x
}
// anonymous
init {
z = 8
}
constructor(a: String, b: Int = 4): this() {
y = 5
}
constructor(a: Double, b: Int = 6): this(a.toInt()) {
y = 7
}
// anonymous
init {
y = 9
}
}