mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Migrate boxInline tests to new multi-file framework
This commit is contained in:
committed by
Alexander Udalov
parent
fa1f7d988e
commit
cc84aabdcf
28
compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt
vendored
Normal file
28
compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package zzz
|
||||
|
||||
|
||||
inline fun calc(crossinline lambda: () -> Int): Int {
|
||||
return doCalc { lambda() }
|
||||
}
|
||||
|
||||
fun doCalc(lambda2: () -> Int): Int {
|
||||
return lambda2()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
//NO_CHECK_LAMBDA_INLINING
|
||||
import zzz.*
|
||||
|
||||
fun box(): String {
|
||||
|
||||
val p = { calc { 11 }} ()
|
||||
|
||||
val z = { calc { 12 }}()
|
||||
|
||||
if (p == z) return "fail"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user