Copy methods for lambdas to DefaultImpls without receiver transformation
#KT-48230 Fixed
This commit is contained in:
@@ -50,7 +50,7 @@ FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
CONST Int type=kotlin.Int value=10
|
||||
VAR name:y type:kotlin.Int [val]
|
||||
CONST Int type=kotlin.Int value=10
|
||||
FUN name:localFunc visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
FUN LOCAL_FUNCTION name:localFunc visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.IntIterator [val]
|
||||
|
||||
@@ -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()
|
||||
Reference in New Issue
Block a user