JS: create new common directory for all generated tests, migrate several tests there
This commit is contained in:
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
// KT-6037: KT-6037 Javascript default function arguments fill code generated in wrong order on method without "return keyword"
|
||||
package foo
|
||||
|
||||
inline fun <T> id(x: T) = x
|
||||
|
||||
fun test(arg: Int = 10) = id(arg)
|
||||
|
||||
fun foo(value: String = "K") = "O" + try { value } catch(e: Exception) { "..." }
|
||||
|
||||
fun box(): String {
|
||||
|
||||
assertEquals(10, test())
|
||||
assertEquals(100, test(100))
|
||||
assertEquals("OK", foo())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user