Tracking of implicit receiver from enclosing lambda
This commit is contained in:
@@ -14,8 +14,16 @@ fun String.foo() {
|
||||
1.extensionFun()
|
||||
|
||||
extensionFun()
|
||||
|
||||
with(123) {
|
||||
extensionFun()
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
"A".foo()
|
||||
}
|
||||
|
||||
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
|
||||
return receiver.block()
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
12 <bold>""</bold>.extensionFun()
|
||||
|
||||
20 <bold>"A"</bold>.foo()
|
||||
24 <bold>"A"</bold>.foo()
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
11 fun <bold>String</bold>.foo() {
|
||||
20 <bold>"A"</bold>.foo()
|
||||
24 <bold>"A"</bold>.foo()
|
||||
|
||||
3 KotlinUtil.extensionFun(<bold>"x"</bold>);
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
@@ -15,3 +15,11 @@
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
14 <bold>1</bold>.extensionFun()
|
||||
|
||||
18 with(<bold>123</bold>) {
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
18 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
27 [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
28 return <bold>receiver</bold>.block()
|
||||
27 inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
18 with(<bold>123</bold>) {
|
||||
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
14 <bold>1</bold>.extensionFun()
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
14 <bold>1</bold>.extensionFun()
|
||||
20 <bold>"A"</bold>.foo()
|
||||
18 with(123) <bold>{</bold>
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
18 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
24 <bold>"A"</bold>.foo()
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
11 fun <bold>String</bold>.foo() {
|
||||
20 <bold>"A"</bold>.foo()
|
||||
24 <bold>"A"</bold>.foo()
|
||||
|
||||
[Other Values]
|
||||
3 KotlinUtil.extensionFun(<bold>"x"</bold>);
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
8 fun <bold>Any</bold>.extensionFun() {
|
||||
3 KotlinUtil.extensionFun(<bold>"x"</bold>);
|
||||
11 fun <bold>String</bold>.foo() {
|
||||
20 <bold>"A"</bold>.foo()
|
||||
24 <bold>"A"</bold>.foo()
|
||||
12 <bold>""</bold>.extensionFun()
|
||||
14 <bold>1</bold>.extensionFun()
|
||||
18 [LAMBDA CALLS] with(123) <bold>{</bold>
|
||||
27 [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
|
||||
28 return <bold>receiver</bold>.block()
|
||||
27 inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
|
||||
18 with(<bold>123</bold>) {
|
||||
|
||||
Reference in New Issue
Block a user