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,18 +1,14 @@
// ERROR: 'public fun Test(s: kotlin.String): Test' is already defined in root package
// ERROR: 'public constructor Test(s: kotlin.String)' is already defined in root package
// ERROR: None of the following functions can be called with the arguments supplied: public fun Test(): Test defined in root package public fun Test(s: kotlin.String): Test defined in root package public constructor Test(s: kotlin.String) defined in Test
// ERROR: Overload resolution ambiguity: public fun Test(s: kotlin.String): Test defined in root package public constructor Test(s: kotlin.String) defined in Test
public fun Test(): Test {
val __ = Test(null)
__.b = true
return __
}
public fun Test(s: String): Test {
return Test(s)
}
public class Test(private val s: String) {
// ERROR: Property must be initialized or be abstract
public class Test {
private val s: String
var b: Boolean = false
var d: Double = 0.toDouble()
}
public constructor() {
b = true
}
public constructor(s: String) {
this.s = s
}
}