JVM_IR KT-44974 fix SAM-converted capturing extension lambda

This commit is contained in:
Dmitry Petrov
2021-02-16 17:47:11 +03:00
parent 83ed67546b
commit 56a104dda9
10 changed files with 121 additions and 20 deletions
@@ -0,0 +1,15 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// SAM_CONVERSIONS: INDY
fun interface IExtFun {
fun String.foo(s: String) : String
}
fun box(): String {
val oChar = 'O'
val iExtFun = IExtFun { this + oChar.toString() + it }
return with(iExtFun) {
"".foo("K")
}
}