[IR] Supported inlining of adapted references + tests
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: IGNORED_IN_JS
|
||||
// !LANGUAGE: +NewInference
|
||||
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun foo(f: (Int, Int) -> Int): Int =
|
||||
f(42, 117)
|
||||
|
||||
inline fun bar (vararg xs: Int): Int {
|
||||
var sum = 0
|
||||
for (x in xs) sum += x
|
||||
return sum
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
fun box(): String = if (foo(::bar) == 159) "OK" else "fail"
|
||||
Reference in New Issue
Block a user