Migrate boxInline tests to new multi-file framework
This commit is contained in:
committed by
Alexander Udalov
parent
fa1f7d988e
commit
cc84aabdcf
+24
@@ -0,0 +1,24 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
inline fun bar(crossinline y: () -> String) = {
|
||||
{ { call(y) }() }()
|
||||
}
|
||||
|
||||
public inline fun <T> call(crossinline f: () -> T): T = {{ f() }()}()
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
val bar1 = bar {"123"} ()
|
||||
val bar2 = bar2 { "1234" } ()
|
||||
return if (bar1 == "123" && bar2 == "1234") "OK" else "fail: $bar1 $bar2"
|
||||
}
|
||||
|
||||
inline fun bar2(crossinline y: () -> String) = {
|
||||
{ { call(y) }() }()
|
||||
}
|
||||
Reference in New Issue
Block a user