Fix for KT-10137: Internal error: couldn't inline method call on lambda taking extension function parameter
#KT-10137 Fixed
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
var result = "fail"
|
||||
W("OK").safe {
|
||||
result = this as String
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
class W(val value: Any)
|
||||
|
||||
inline fun W.safe(crossinline body : Any.() -> Unit) {
|
||||
{
|
||||
this.value?.body()
|
||||
}()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import test.*
|
||||
|
||||
fun box(): String {
|
||||
var result = "fail"
|
||||
W("OK").safe {
|
||||
{
|
||||
result = this as String
|
||||
}()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
class W(val value: Any)
|
||||
|
||||
inline fun W.safe(crossinline body : Any.() -> Unit) {
|
||||
{
|
||||
this.value?.body()
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user