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
@@ -10,7 +10,9 @@ fun bar(): Int {
return 100
}
fun foo(a: Int = when { else -> bar() }): Int = a + 1
fun baz() = 1
fun foo(a: Int = when (baz()) { 1 -> bar(); else -> 0 }): Int = a + 1
fun bar0(x: String = try { global } finally {}): String {
return "bar: ${x}"