Support for secondary constructors in j2k

This commit is contained in:
Valentin Kipyatkov
2015-03-06 19:21:30 +01:00
parent b44dbe6ca2
commit 569e4a68ae
33 changed files with 367 additions and 589 deletions
@@ -1,8 +1,3 @@
// this is a secondary constructor 2
fun A(s: String): A {
return A(s.length())
} // end of secondary constructor 2 body
class A// this is a primary constructor
(p: Int = 1) {
private val v: Int
@@ -10,6 +5,10 @@ class A// this is a primary constructor
{
v = 1
} // end of primary constructor body
// this is a secondary constructor 2
constructor(s: String) : this(s.length()) {
} // end of secondary constructor 2 body
}// this is a secondary constructor 1
// end of secondary constructor 1 body