JS: add some tests to ensure that AST metadata is correctly serialized and deserialized and visible to JS optimizer
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// FILE: a.kt
|
||||
|
||||
inline fun foo(f: (Int) -> String, x: Int = 23): String = "foo(${f(x)})"
|
||||
|
||||
|
||||
// FILE: b.kt
|
||||
// RECOMPILE
|
||||
|
||||
fun box(): String {
|
||||
val result = foo({ it.toString() }) + foo({ it.toString() }, 42)
|
||||
if (result != "foo(23)foo(42)") return "fail: $result"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user