Rename receiver$0 in CallableReference to receiver

#KT-15449 Fixed
This commit is contained in:
Mikhael Bogdanov
2016-12-28 14:21:00 +01:00
parent 4774d19890
commit 2566a7a25e
17 changed files with 96 additions and 29 deletions
@@ -0,0 +1,40 @@
// FILE: 1.kt
package test
inline fun linearLayout2(init: X.() -> Unit) {
return X().init()
}
var result = "fail"
class X {
fun calc() {
result = "OK"
}
}
// FILE: 2.kt
//NO_CHECK_LAMBDA_INLINING
import test.*
class A {
fun test() {
linearLayout2 {
{
apply2 {
this@linearLayout2::calc
}()
}()
}
}
public fun <T, Z> T.apply2(block: T.() -> Z): Z {
return block()
}
}
fun box(): String {
A().test()
return result
}