JS: refactor generation of functions with optional parameters. Fix #KT-7302, #KT-13888

This commit is contained in:
Alexey Andreev
2016-09-16 15:40:12 +03:00
parent 4b3cf432dc
commit d2050ace72
24 changed files with 428 additions and 256 deletions
@@ -0,0 +1,26 @@
package foo
var global = ""
open class A {
open fun foo(x: Int = 23) {
global += "A.foo($x);"
}
}
class B : A() {
override fun foo(x: Int) {
global += "B.foo($x);"
}
}
@native fun bar(a: A)
fun box(): String {
bar(A())
bar(B())
if (global != "A.foo(23);A.foo(99);B.foo(23);B.foo(99);") return "fail: $global"
return "OK"
}