Copy methods for lambdas to DefaultImpls without receiver transformation

#KT-48230 Fixed
This commit is contained in:
Mikhael Bogdanov
2021-08-17 12:22:05 +02:00
committed by Space
parent 6d7eb2bd21
commit a5e59e09ee
25 changed files with 111 additions and 19 deletions
@@ -0,0 +1,14 @@
// NO_CHECK_LAMBDA_INLINING
// FILE: 1.kt
inline fun withO(block: String.() -> String) = "O".block()
// FILE: 2.kt
interface I {
val k: String
fun foo() = withO(fun String.(): String { return this + k })
}
fun box(): String = object : I {
override val k = "K"
}.foo()