Process inline functions from libraries (if sources available) + process source libraries if analysis scope includes them

This commit is contained in:
Valentin Kipyatkov
2020-04-13 13:50:42 +03:00
parent 06de3de1a6
commit 411f2c833c
35 changed files with 408 additions and 345 deletions
@@ -1,4 +1,5 @@
// FLOW: IN
// RUNTIME_WITH_SOURCES
fun foo(f: String.(Int) -> Unit) {
f("", 1)
@@ -1,18 +1,18 @@
4 f("", <bold>1</bold>)
15 val v = <bold>it</bold>
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
4 f("", <bold>1</bold>)
5 f("", <bold>1</bold>)
16 val v = <bold>it</bold>
15 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
4 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
5 f("", <bold>1</bold>)
6 "".f(<bold>2</bold>)
15 val v = <bold>it</bold>
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
6 "".f(<bold>2</bold>)
7 "".f(<bold>2</bold>)
16 val v = <bold>it</bold>
15 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
4 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
7 "".f(<bold>2</bold>)
9 f(<bold>3</bold>)
15 val v = <bold>it</bold>
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
9 f(<bold>3</bold>)
10 f(<bold>3</bold>)
16 val v = <bold>it</bold>
15 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
4 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
10 f(<bold>3</bold>)
@@ -1,4 +1,4 @@
[NotNull Values]
15 val v = <bold>it</bold>
15 val v = <bold>it</bold>
16 val v = <bold>it</bold>
16 val v = <bold>it</bold>
@@ -1,6 +1,6 @@
15 val v = <bold>it</bold>
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
4 f("", <bold>1</bold>)
6 "".f(<bold>2</bold>)
9 f(<bold>3</bold>)
16 val v = <bold>it</bold>
15 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{</bold>
4 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
5 f("", <bold>1</bold>)
7 "".f(<bold>2</bold>)
10 f(<bold>3</bold>)
+1 -4
View File
@@ -1,4 +1,5 @@
// FLOW: IN
// RUNTIME_WITH_SOURCES
fun foo(f: String.(Int) -> Unit) {
f("", 1)
@@ -15,7 +16,3 @@ fun test() {
val v = <caret>i
}
}
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
return receiver.block()
}
@@ -1,21 +1,21 @@
4 f("", <bold>1</bold>)
15 val v = <bold>i</bold>
14 foo { <bold>i</bold> ->
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
4 f("", <bold>1</bold>)
5 f("", <bold>1</bold>)
16 val v = <bold>i</bold>
15 foo { <bold>i</bold> ->
15 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
4 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
5 f("", <bold>1</bold>)
6 "".f(<bold>2</bold>)
15 val v = <bold>i</bold>
14 foo { <bold>i</bold> ->
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
6 "".f(<bold>2</bold>)
7 "".f(<bold>2</bold>)
16 val v = <bold>i</bold>
15 foo { <bold>i</bold> ->
15 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
4 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
7 "".f(<bold>2</bold>)
9 f(<bold>3</bold>)
15 val v = <bold>i</bold>
14 foo { <bold>i</bold> ->
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
9 f(<bold>3</bold>)
10 f(<bold>3</bold>)
16 val v = <bold>i</bold>
15 foo { <bold>i</bold> ->
15 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
4 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
10 f(<bold>3</bold>)
@@ -1,4 +1,4 @@
[NotNull Values]
15 val v = <bold>i</bold>
15 val v = <bold>i</bold>
16 val v = <bold>i</bold>
16 val v = <bold>i</bold>
@@ -1,7 +1,7 @@
15 val v = <bold>i</bold>
14 foo { <bold>i</bold> ->
14 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
3 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
4 f("", <bold>1</bold>)
6 "".f(<bold>2</bold>)
9 f(<bold>3</bold>)
16 val v = <bold>i</bold>
15 foo { <bold>i</bold> ->
15 [LAMBDA CALLS ARGUMENT #0 EXTENSION] foo <bold>{ i -></bold>
4 [LAMBDA CALLS ARGUMENT #0 EXTENSION] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
5 f("", <bold>1</bold>)
7 "".f(<bold>2</bold>)
10 f(<bold>3</bold>)
+1 -4
View File
@@ -1,11 +1,8 @@
// FLOW: IN
// RUNTIME_WITH_SOURCES
fun foo() {
with("A") {
val <caret>v = this
}
}
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
return receiver.block()
}
@@ -1,9 +1,9 @@
4 with(<bold>"A"</bold>) {
5 val <bold>v = this</bold>
5 val v = <bold>this</bold>
4 [LAMBDA CALLS RECEIVER] with("A") <bold>{</bold>
9 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
10 (INLINE CALL with) return <bold>receiver</bold>.block()
9 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
4 with(<bold>"A"</bold>) {
5 with(<bold>"A"</bold>) {
6 val <bold>v = this</bold>
6 val v = <bold>this</bold>
5 [LAMBDA CALLS RECEIVER] with("A") <bold>{</bold>
66 (INLINE CALL with) [LAMBDA CALLS RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
5 with(<bold>"A"</bold>) {
@@ -1,3 +1,4 @@
[NotNull Values]
5 val <bold>v = this</bold>
5 val <bold>v = this</bold>
6 val <bold>v = this</bold>
6 val <bold>v = this</bold>
@@ -1,7 +1,7 @@
5 val <bold>v = this</bold>
5 val v = <bold>this</bold>
4 [LAMBDA CALLS RECEIVER] with("A") <bold>{</bold>
9 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
10 (INLINE CALL with) return <bold>receiver</bold>.block()
9 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
4 with(<bold>"A"</bold>) {
6 val <bold>v = this</bold>
6 val v = <bold>this</bold>
5 [LAMBDA CALLS RECEIVER] with("A") <bold>{</bold>
66 (INLINE CALL with) [LAMBDA CALLS RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
5 with(<bold>"A"</bold>) {
@@ -0,0 +1,12 @@
// FLOW: IN
// RUNTIME_WITH_SOURCES
class C
fun foo() {
val c = C().apply {
extensionFun()
}
}
fun <caret>C.extensionFun() {}
@@ -0,0 +1,8 @@
4 class <bold>C</bold>
12 fun <bold>C</bold>.extensionFun() {}
7 [LAMBDA CALLS RECEIVER] val c = C().apply <bold>{</bold>
79 (INLINE CALL apply) [LAMBDA CALLS RECEIVER] public inline fun <T> T.apply(<bold>block: T.() -> Unit</bold>): T {
79 (INLINE CALL apply) public inline fun <T> <bold>T</bold>.apply(block: T.() -> Unit): T {
7 val c = <bold>C()</bold>.apply {
4 class <bold>C</bold>
@@ -0,0 +1,8 @@
[NotNull Values]
7 val c = <bold>C()</bold>.apply {
12 fun <bold>C</bold>.extensionFun() {}
7 [LAMBDA CALLS RECEIVER] val c = C().apply <bold>{</bold>
79 (INLINE CALL apply) [LAMBDA CALLS RECEIVER] public inline fun <T> T.apply(<bold>block: T.() -> Unit</bold>): T {
79 (INLINE CALL apply) public inline fun <T> <bold>T</bold>.apply(block: T.() -> Unit): T {
7 val c = <bold>C()</bold>.apply {
@@ -0,0 +1,6 @@
12 fun <bold>C</bold>.extensionFun() {}
7 [LAMBDA CALLS RECEIVER] val c = C().apply <bold>{</bold>
79 (INLINE CALL apply) [LAMBDA CALLS RECEIVER] public inline fun <T> T.apply(<bold>block: T.() -> Unit</bold>): T {
79 (INLINE CALL apply) public inline fun <T> <bold>T</bold>.apply(block: T.() -> Unit): T {
7 val c = <bold>C()</bold>.apply {
4 class <bold>C</bold>
+1 -4
View File
@@ -1,4 +1,5 @@
// FLOW: IN
// RUNTIME_WITH_SOURCES
fun <caret>Any.extensionFun() {
}
@@ -46,10 +47,6 @@ inline fun <T, R> with(receiver: T, block: T.() -> R): R {
return result
}
inline fun <T, R> T.let(block: (T) -> R): R {
return block(this)
}
fun <T, R> withNoInline(receiver: T, block: T.() -> R): R {
val result = receiver.block()
return result
@@ -1,60 +1,60 @@
35 <bold>"D"</bold>.letNoInline {
3 fun <bold>Any</bold>.extensionFun() {
36 <bold>it</bold>.extensionFun()
35 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
58 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
59 return block(<bold>this</bold>)
58 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
35 <bold>"D"</bold>.letNoInline {
36 <bold>"D"</bold>.letNoInline {
4 fun <bold>Any</bold>.extensionFun() {
37 <bold>it</bold>.extensionFun()
36 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
55 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
56 return block(<bold>this</bold>)
55 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
36 <bold>"D"</bold>.letNoInline {
39 <bold>"C"</bold>.letNoInline {
3 fun <bold>Any</bold>.extensionFun() {
36 <bold>it</bold>.extensionFun()
35 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
58 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
59 return block(<bold>this</bold>)
58 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
39 <bold>"C"</bold>.letNoInline {
40 <bold>"C"</bold>.letNoInline {
4 fun <bold>Any</bold>.extensionFun() {
37 <bold>it</bold>.extensionFun()
36 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
55 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
56 return block(<bold>this</bold>)
55 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
40 <bold>"C"</bold>.letNoInline {
27 <bold>"A"</bold>.let {
3 fun <bold>Any</bold>.extensionFun() {
28 <bold>it</bold>.extensionFun()
27 [LAMBDA CALLS ARGUMENT #0] "A".let <bold>{</bold>
49 (INLINE CALL let) [LAMBDA CALLS ARGUMENT #0] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
50 (INLINE CALL let) return block(<bold>this</bold>)
49 (INLINE CALL let) inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
27 <bold>"A"</bold>.let {
28 <bold>"A"</bold>.let {
4 fun <bold>Any</bold>.extensionFun() {
29 <bold>it</bold>.extensionFun()
28 [LAMBDA CALLS ARGUMENT #0] "A".let <bold>{</bold>
108 (INLINE CALL let) [LAMBDA CALLS ARGUMENT #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
112 (INLINE CALL let) return block(<bold>this</bold>)
108 (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
28 <bold>"A"</bold>.let {
19 withNoInline(<bold>1</bold>) {
3 fun <bold>Any</bold>.extensionFun() {
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
54 val result = <bold>receiver</bold>.block()
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
19 withNoInline(<bold>1</bold>) {
20 withNoInline(<bold>1</bold>) {
4 fun <bold>Any</bold>.extensionFun() {
20 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
50 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
51 val result = <bold>receiver</bold>.block()
50 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
20 withNoInline(<bold>1</bold>) {
7 with(<bold>123</bold>) {
3 fun <bold>Any</bold>.extensionFun() {
7 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
7 with(<bold>123</bold>) {
8 with(<bold>123</bold>) {
4 fun <bold>Any</bold>.extensionFun() {
8 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
45 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
46 (INLINE CALL with) val result = <bold>receiver</bold>.block()
45 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
8 with(<bold>123</bold>) {
23 withNoInline(<bold>2</bold>) {
3 fun <bold>Any</bold>.extensionFun() {
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
54 val result = <bold>receiver</bold>.block()
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
23 withNoInline(<bold>2</bold>) {
24 withNoInline(<bold>2</bold>) {
4 fun <bold>Any</bold>.extensionFun() {
20 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
50 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
51 val result = <bold>receiver</bold>.block()
50 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
24 withNoInline(<bold>2</bold>) {
11 with(<bold>456</bold>) {
3 fun <bold>Any</bold>.extensionFun() {
12 <bold>this</bold>.extensionFun()
11 [LAMBDA CALLS RECEIVER] with(456) <bold>{</bold>
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
11 with(<bold>456</bold>) {
12 with(<bold>456</bold>) {
4 fun <bold>Any</bold>.extensionFun() {
13 <bold>this</bold>.extensionFun()
12 [LAMBDA CALLS RECEIVER] with(456) <bold>{</bold>
45 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
46 (INLINE CALL with) val result = <bold>receiver</bold>.block()
45 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
12 with(<bold>456</bold>) {
@@ -1,30 +1,30 @@
[NotNull Values]
7 with(<bold>123</bold>) {
3 fun <bold>Any</bold>.extensionFun() {
7 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
7 with(<bold>123</bold>) {
12 <bold>this</bold>.extensionFun()
3 fun <bold>Any</bold>.extensionFun() {
12 <bold>this</bold>.extensionFun()
19 withNoInline(<bold>1</bold>) {
3 fun <bold>Any</bold>.extensionFun() {
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
54 val result = <bold>receiver</bold>.block()
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
19 withNoInline(<bold>1</bold>) {
23 withNoInline(<bold>2</bold>) {
3 fun <bold>Any</bold>.extensionFun() {
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
54 val result = <bold>receiver</bold>.block()
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
23 withNoInline(<bold>2</bold>) {
28 <bold>it</bold>.extensionFun()
3 fun <bold>Any</bold>.extensionFun() {
28 <bold>it</bold>.extensionFun()
36 <bold>it</bold>.extensionFun()
8 with(<bold>123</bold>) {
4 fun <bold>Any</bold>.extensionFun() {
8 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
45 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
46 (INLINE CALL with) val result = <bold>receiver</bold>.block()
45 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
8 with(<bold>123</bold>) {
13 <bold>this</bold>.extensionFun()
4 fun <bold>Any</bold>.extensionFun() {
13 <bold>this</bold>.extensionFun()
20 withNoInline(<bold>1</bold>) {
4 fun <bold>Any</bold>.extensionFun() {
20 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
50 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
51 val result = <bold>receiver</bold>.block()
50 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
20 withNoInline(<bold>1</bold>) {
24 withNoInline(<bold>2</bold>) {
4 fun <bold>Any</bold>.extensionFun() {
20 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
50 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
51 val result = <bold>receiver</bold>.block()
50 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
24 withNoInline(<bold>2</bold>) {
37 <bold>it</bold>.extensionFun()
4 fun <bold>Any</bold>.extensionFun() {
29 <bold>it</bold>.extensionFun()
37 <bold>it</bold>.extensionFun()
@@ -1,31 +1,31 @@
3 fun <bold>Any</bold>.extensionFun() {
7 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
7 with(<bold>123</bold>) {
12 <bold>this</bold>.extensionFun()
11 [LAMBDA CALLS RECEIVER] with(456) <bold>{</bold>
44 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
45 (INLINE CALL with) val result = <bold>receiver</bold>.block()
44 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
11 with(<bold>456</bold>) {
19 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
53 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
54 val result = <bold>receiver</bold>.block()
53 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
19 withNoInline(<bold>1</bold>) {
23 withNoInline(<bold>2</bold>) {
28 <bold>it</bold>.extensionFun()
27 [LAMBDA CALLS ARGUMENT #0] "A".let <bold>{</bold>
49 (INLINE CALL let) [LAMBDA CALLS ARGUMENT #0] inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
50 (INLINE CALL let) return block(<bold>this</bold>)
49 (INLINE CALL let) inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
27 <bold>"A"</bold>.let {
36 <bold>it</bold>.extensionFun()
35 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
58 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
59 return block(<bold>this</bold>)
58 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
35 <bold>"D"</bold>.letNoInline {
39 <bold>"C"</bold>.letNoInline {
4 fun <bold>Any</bold>.extensionFun() {
8 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
45 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
46 (INLINE CALL with) val result = <bold>receiver</bold>.block()
45 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
8 with(<bold>123</bold>) {
13 <bold>this</bold>.extensionFun()
12 [LAMBDA CALLS RECEIVER] with(456) <bold>{</bold>
45 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
46 (INLINE CALL with) val result = <bold>receiver</bold>.block()
45 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
12 with(<bold>456</bold>) {
20 [LAMBDA CALLS RECEIVER] withNoInline(1) <bold>{</bold>
50 [LAMBDA CALLS RECEIVER] fun <T, R> withNoInline(receiver: T, <bold>block: T.() -> R</bold>): R {
51 val result = <bold>receiver</bold>.block()
50 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
20 withNoInline(<bold>1</bold>) {
24 withNoInline(<bold>2</bold>) {
29 <bold>it</bold>.extensionFun()
28 [LAMBDA CALLS ARGUMENT #0] "A".let <bold>{</bold>
108 (INLINE CALL let) [LAMBDA CALLS ARGUMENT #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
112 (INLINE CALL let) return block(<bold>this</bold>)
108 (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
28 <bold>"A"</bold>.let {
37 <bold>it</bold>.extensionFun()
36 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
55 [LAMBDA CALLS ARGUMENT #0] fun <T, R> T.letNoInline(<bold>block: (T) -> R</bold>): R {
56 return block(<bold>this</bold>)
55 fun <T, R> <bold>T</bold>.letNoInline(block: (T) -> R): R {
36 <bold>"D"</bold>.letNoInline {
40 <bold>"C"</bold>.letNoInline {
+1 -5
View File
@@ -1,5 +1,5 @@
// FLOW: IN
// WITH_RUNTIME
// RUNTIME_WITH_SOURCES
@file: JvmName("KotlinUtil")
@@ -23,7 +23,3 @@ fun String.foo() {
fun main() {
"A".foo()
}
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
return receiver.block()
}
@@ -18,8 +18,8 @@
18 with(<bold>123</bold>) {
8 fun <bold>Any</bold>.extensionFun() {
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
27 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
28 (INLINE CALL with) return <bold>receiver</bold>.block()
27 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
66 (INLINE CALL with) [LAMBDA CALLS RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
18 with(<bold>123</bold>) {
@@ -8,9 +8,9 @@
18 with(<bold>123</bold>) {
8 fun <bold>Any</bold>.extensionFun() {
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
27 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
28 (INLINE CALL with) return <bold>receiver</bold>.block()
27 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
66 (INLINE CALL with) [LAMBDA CALLS RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
18 with(<bold>123</bold>) {
24 <bold>"A"</bold>.foo()
8 fun <bold>Any</bold>.extensionFun() {
@@ -5,7 +5,7 @@
12 <bold>""</bold>.extensionFun()
14 <bold>1</bold>.extensionFun()
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
27 (INLINE CALL with) [LAMBDA CALLS RECEIVER] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
28 (INLINE CALL with) return <bold>receiver</bold>.block()
27 (INLINE CALL with) inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
66 (INLINE CALL with) [LAMBDA CALLS RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
18 with(<bold>123</bold>) {