initial support for secondary constructors; constructor generation refactored a bit

This commit is contained in:
Dmitry Jemerov
2011-06-17 15:38:10 +02:00
parent 54d2f25d75
commit 7b9ea52b7a
5 changed files with 222 additions and 77 deletions
@@ -0,0 +1,8 @@
class C(val n: Int, val s: String) {
this(n: Int): this(n, "foo") { }
}
fun box(): String {
val c = C(10)
return if (c.s == "foo") "OK" else "fail"
}