mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Don't delete nested default lambda classes during inline transformation
(cherry picked from commit 50608d0)
This commit is contained in:
24
compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt
vendored
Normal file
24
compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
interface Call {
|
||||
fun run(): String
|
||||
}
|
||||
|
||||
inline fun test(p: String, s: () -> Call = {
|
||||
object : Call {
|
||||
override fun run() = p
|
||||
} as Call
|
||||
}) = s()
|
||||
|
||||
val same = test("O")
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
val inlined = test("K")
|
||||
return same.run() + inlined.run()
|
||||
}
|
||||
Reference in New Issue
Block a user