Implement kotlin.jvm.overloads annotation for generating all overloads of a method that has default parameter values.

#KT-2095 Fixed

fix backend-side issues with kotlin.jvm.overloads: support the annotation on constructors, generate nullablity annotations on parameters, generate generic signatures, add various tests
This commit is contained in:
Dmitry Jemerov
2015-03-27 18:48:03 +01:00
parent e15b984232
commit 39828bfd32
19 changed files with 231 additions and 35 deletions
@@ -0,0 +1,12 @@
class C(val i: Int) {
var status = "fail"
[kotlin.jvm.overloads] constructor(o: String, k: String = "K"): this(-1) {
status = o + k
}
}
fun box(): String {
val c = (javaClass<C>().getConstructor(javaClass<String>()).newInstance("O"))
return c.status
}