Replaced [LAMBDA OUT] in test data to [LAMBDA CALLS] which is less confusing

This commit is contained in:
Valentin Kipyatkov
2020-04-11 11:58:21 +03:00
parent 7bcd6619cf
commit 4e88e2697c
36 changed files with 94 additions and 94 deletions
@@ -38,5 +38,5 @@ data class LambdaCallsBehaviour(
get() = KotlinBundle.message("slicer.text.tracking.lambda.calls")
override val testPresentationPrefix: String
get() = "[LAMBDA OUT] "
get() = "[LAMBDA CALLS] "
}
@@ -9,7 +9,7 @@
8 val x = foo(<bold>fun(n: Int) = n</bold>)
8 val x = foo(fun(n: Int) = <bold>n</bold>)
8 val x = foo(fun(<bold>n: Int</bold>) = n)
8 [LAMBDA OUT] val x = foo(<bold>fun(n: Int) = n</bold>)
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int) = n</bold>)
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return f(<bold>1</bold>)
@@ -8,6 +8,6 @@
8 val x = foo(<bold>fun(n: Int) = n</bold>)
8 val x = foo(fun(n: Int) = <bold>n</bold>)
8 val x = foo(fun(<bold>n: Int</bold>) = n)
8 [LAMBDA OUT] val x = foo(<bold>fun(n: Int) = n</bold>)
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int) = n</bold>)
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return f(<bold>1</bold>)
@@ -9,7 +9,7 @@
8 val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
8 val x = foo(fun(n: Int): Int { return <bold>n</bold> })
8 val x = foo(fun(<bold>n: Int</bold>): Int { return n })
8 [LAMBDA OUT] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return f(<bold>1</bold>)
@@ -8,6 +8,6 @@
8 val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
8 val x = foo(fun(n: Int): Int { return <bold>n</bold> })
8 val x = foo(fun(<bold>n: Int</bold>): Int { return n })
8 [LAMBDA OUT] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return f(<bold>1</bold>)
@@ -2,7 +2,7 @@
9 val <bold>v = value</bold>
9 val v = <bold>value</bold>
8 foo(fun(<bold>value: Int</bold>) {
8 [LAMBDA OUT] foo(<bold>fun(value: Int) {</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Unit</bold>) {
8 [LAMBDA CALLS] foo(<bold>fun(value: Int) {</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
4 f(<bold>1</bold>)
@@ -1,6 +1,6 @@
9 val <bold>v = value</bold>
9 val v = <bold>value</bold>
8 foo(fun(<bold>value: Int</bold>) {
8 [LAMBDA OUT] foo(<bold>fun(value: Int) {</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Unit</bold>) {
8 [LAMBDA CALLS] foo(<bold>fun(value: Int) {</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
4 f(<bold>1</bold>)
@@ -11,11 +11,11 @@
8 [LAMBDA IN] val x = foo(1, 2) { <bold>{ it }</bold> }
8 val x = foo(1, 2) { <bold>{ it }</bold> }
8 val x = foo(1, 2) { { <bold>it</bold> } }
8 [LAMBDA OUT] val x = foo(1, 2) { <bold>{ it }</bold> }
8 [LAMBDA OUT] val x = foo(1, 2) <bold>{ { it } }</bold>
8 [LAMBDA OUT] [LAMBDA OUT] val x = foo(1, 2) <bold>{ { it } }</bold>
3 [LAMBDA OUT] [LAMBDA OUT] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
4 [LAMBDA OUT] return <bold>f(a)</bold>(b)
8 [LAMBDA CALLS] val x = foo(1, 2) { <bold>{ it }</bold> }
8 [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
8 [LAMBDA CALLS] [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
3 [LAMBDA CALLS] [LAMBDA CALLS] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
4 [LAMBDA CALLS] return <bold>f(a)</bold>(b)
4 return f(a)(<bold>b</bold>)
3 fun foo(a: Int, <bold>b: Int</bold>, f: (Int) -> (Int) -> Int): Int {
8 val x = foo(1, <bold>2</bold>) { { it } }
+5 -5
View File
@@ -10,11 +10,11 @@
8 [LAMBDA IN] val x = foo(1, 2) { <bold>{ it }</bold> }
8 val x = foo(1, 2) { <bold>{ it }</bold> }
8 val x = foo(1, 2) { { <bold>it</bold> } }
8 [LAMBDA OUT] val x = foo(1, 2) { <bold>{ it }</bold> }
8 [LAMBDA OUT] val x = foo(1, 2) <bold>{ { it } }</bold>
8 [LAMBDA OUT] [LAMBDA OUT] val x = foo(1, 2) <bold>{ { it } }</bold>
3 [LAMBDA OUT] [LAMBDA OUT] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
4 [LAMBDA OUT] return <bold>f(a)</bold>(b)
8 [LAMBDA CALLS] val x = foo(1, 2) { <bold>{ it }</bold> }
8 [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
8 [LAMBDA CALLS] [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
3 [LAMBDA CALLS] [LAMBDA CALLS] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
4 [LAMBDA CALLS] return <bold>f(a)</bold>(b)
4 return f(a)(<bold>b</bold>)
3 fun foo(a: Int, <bold>b: Int</bold>, f: (Int) -> (Int) -> Int): Int {
8 val x = foo(1, <bold>2</bold>) { { it } }
@@ -1,18 +1,18 @@
4 f("", <bold>1</bold>)
15 val v = <bold>it</bold>
14 [LAMBDA OUT] foo <bold>{</bold>
3 [LAMBDA OUT] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
14 [LAMBDA CALLS] foo <bold>{</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
4 f("", <bold>1</bold>)
6 "".f(<bold>2</bold>)
15 val v = <bold>it</bold>
14 [LAMBDA OUT] foo <bold>{</bold>
3 [LAMBDA OUT] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
14 [LAMBDA CALLS] foo <bold>{</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
6 "".f(<bold>2</bold>)
9 f(<bold>3</bold>)
15 val v = <bold>it</bold>
14 [LAMBDA OUT] foo <bold>{</bold>
3 [LAMBDA OUT] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
14 [LAMBDA CALLS] foo <bold>{</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
9 f(<bold>3</bold>)
@@ -1,6 +1,6 @@
15 val v = <bold>it</bold>
14 [LAMBDA OUT] foo <bold>{</bold>
3 [LAMBDA OUT] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
14 [LAMBDA CALLS] foo <bold>{</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
4 f("", <bold>1</bold>)
6 "".f(<bold>2</bold>)
9 f(<bold>3</bold>)
@@ -1,21 +1,21 @@
4 f("", <bold>1</bold>)
15 val v = <bold>i</bold>
14 foo { <bold>i</bold> ->
14 [LAMBDA OUT] foo <bold>{ i -></bold>
3 [LAMBDA OUT] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
14 [LAMBDA CALLS] foo <bold>{ i -></bold>
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
4 f("", <bold>1</bold>)
6 "".f(<bold>2</bold>)
15 val v = <bold>i</bold>
14 foo { <bold>i</bold> ->
14 [LAMBDA OUT] foo <bold>{ i -></bold>
3 [LAMBDA OUT] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
14 [LAMBDA CALLS] foo <bold>{ i -></bold>
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
6 "".f(<bold>2</bold>)
9 f(<bold>3</bold>)
15 val v = <bold>i</bold>
14 foo { <bold>i</bold> ->
14 [LAMBDA OUT] foo <bold>{ i -></bold>
3 [LAMBDA OUT] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
14 [LAMBDA CALLS] foo <bold>{ i -></bold>
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
9 f(<bold>3</bold>)
@@ -1,7 +1,7 @@
15 val v = <bold>i</bold>
14 foo { <bold>i</bold> ->
14 [LAMBDA OUT] foo <bold>{ i -></bold>
3 [LAMBDA OUT] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
14 [LAMBDA CALLS] foo <bold>{ i -></bold>
3 [LAMBDA CALLS] fun foo(<bold>f: String.(Int) -> Unit</bold>) {
4 f("", <bold>1</bold>)
6 "".f(<bold>2</bold>)
9 f(<bold>3</bold>)
@@ -1,8 +1,8 @@
4 with(<bold>"A"</bold>) {
5 val <bold>v = this</bold>
5 val v = <bold>this</bold>
4 [LAMBDA OUT] with("A") <bold>{</bold>
9 [LAMBDA OUT] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
4 [LAMBDA CALLS] with("A") <bold>{</bold>
9 [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
10 return <bold>receiver</bold>.block()
9 inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
4 with(<bold>"A"</bold>) {
@@ -1,7 +1,7 @@
5 val <bold>v = this</bold>
5 val v = <bold>this</bold>
4 [LAMBDA OUT] with("A") <bold>{</bold>
9 [LAMBDA OUT] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
4 [LAMBDA CALLS] with("A") <bold>{</bold>
9 [LAMBDA CALLS] inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
10 return <bold>receiver</bold>.block()
9 inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
4 with(<bold>"A"</bold>) {
@@ -1,6 +1,6 @@
4 f(<bold>1</bold>)
9 val v = <bold>it</bold>
8 [LAMBDA OUT] foo <bold>{</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Unit</bold>) {
8 [LAMBDA CALLS] foo <bold>{</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
4 f(<bold>1</bold>)
@@ -1,4 +1,4 @@
9 val v = <bold>it</bold>
8 [LAMBDA OUT] foo <bold>{</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Unit</bold>) {
8 [LAMBDA CALLS] foo <bold>{</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
4 f(<bold>1</bold>)
+2 -2
View File
@@ -1,7 +1,7 @@
4 f(<bold>1</bold>)
9 val v = <bold>value</bold>
8 foo { <bold>value</bold> ->
8 [LAMBDA OUT] foo <bold>{ value -></bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Unit</bold>) {
8 [LAMBDA CALLS] foo <bold>{ value -></bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
4 f(<bold>1</bold>)
+2 -2
View File
@@ -1,5 +1,5 @@
9 val v = <bold>value</bold>
8 foo { <bold>value</bold> ->
8 [LAMBDA OUT] foo <bold>{ value -></bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Unit</bold>) {
8 [LAMBDA CALLS] foo <bold>{ value -></bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Unit</bold>) {
4 f(<bold>1</bold>)
+2 -2
View File
@@ -8,7 +8,7 @@
8 [LAMBDA IN] val x = foo <bold>{ it }</bold>
8 val x = foo <bold>{ it }</bold>
8 val x = foo { <bold>it</bold> }
8 [LAMBDA OUT] val x = foo <bold>{ it }</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo <bold>{ it }</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return f(<bold>1</bold>)
+2 -2
View File
@@ -7,6 +7,6 @@
8 [LAMBDA IN] val x = foo <bold>{ it }</bold>
8 val x = foo <bold>{ it }</bold>
8 val x = foo { <bold>it</bold> }
8 [LAMBDA OUT] val x = foo <bold>{ it }</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo <bold>{ it }</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return f(<bold>1</bold>)
@@ -10,9 +10,9 @@
9 [LAMBDA IN] val y = foo <bold>{ it }</bold>
9 val y = foo <bold>{ it }</bold>
9 val y = foo { <bold>it</bold> }
9 [LAMBDA OUT] val y = foo <bold>{ it }</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 [LAMBDA OUT] val x = <bold>f</bold>
4 [LAMBDA OUT] val <bold>x = f</bold>
9 [LAMBDA CALLS] val y = foo <bold>{ it }</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 [LAMBDA CALLS] val x = <bold>f</bold>
4 [LAMBDA CALLS] val <bold>x = f</bold>
5 return x(<bold>1</bold>)
@@ -9,8 +9,8 @@
9 [LAMBDA IN] val y = foo <bold>{ it }</bold>
9 val y = foo <bold>{ it }</bold>
9 val y = foo { <bold>it</bold> }
9 [LAMBDA OUT] val y = foo <bold>{ it }</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 [LAMBDA OUT] val x = <bold>f</bold>
4 [LAMBDA OUT] val <bold>x = f</bold>
9 [LAMBDA CALLS] val y = foo <bold>{ it }</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 [LAMBDA CALLS] val x = <bold>f</bold>
4 [LAMBDA CALLS] val <bold>x = f</bold>
5 return x(<bold>1</bold>)
+2 -2
View File
@@ -9,8 +9,8 @@
5 fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
5 fun bar(a: Int): Int = foo(a) { <bold>if (it > 0) it else return 0</bold> }
5 fun bar(a: Int): Int = foo(a) { if (it > 0) <bold>it</bold> else return 0 }
5 [LAMBDA OUT] fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
3 [LAMBDA OUT] inline fun foo(a: Int, <bold>f: (Int) -> Int</bold>) = f(a)
5 [LAMBDA CALLS] fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
3 [LAMBDA CALLS] inline fun foo(a: Int, <bold>f: (Int) -> Int</bold>) = f(a)
3 inline fun foo(a: Int, f: (Int) -> Int) = f(<bold>a</bold>)
3 inline fun foo(<bold>a: Int</bold>, f: (Int) -> Int) = f(a)
5 fun bar(a: Int): Int = foo(<bold>a</bold>) { if (it > 0) it else return 0 }
+2 -2
View File
@@ -8,8 +8,8 @@
5 fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
5 fun bar(a: Int): Int = foo(a) { <bold>if (it > 0) it else return 0</bold> }
5 fun bar(a: Int): Int = foo(a) { if (it > 0) <bold>it</bold> else return 0 }
5 [LAMBDA OUT] fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
3 [LAMBDA OUT] inline fun foo(a: Int, <bold>f: (Int) -> Int</bold>) = f(a)
5 [LAMBDA CALLS] fun bar(a: Int): Int = foo(a) <bold>{ if (it > 0) it else return 0 }</bold>
3 [LAMBDA CALLS] inline fun foo(a: Int, <bold>f: (Int) -> Int</bold>) = f(a)
3 inline fun foo(a: Int, f: (Int) -> Int) = f(<bold>a</bold>)
3 inline fun foo(<bold>a: Int</bold>, f: (Int) -> Int) = f(a)
5 fun bar(a: Int): Int = foo(<bold>a</bold>) { if (it > 0) it else return 0 }
@@ -1,7 +1,7 @@
8 val x = foo(fun(n: Int) = <bold>n</bold>)
8 val x = foo(<bold>fun(n: Int) = n</bold>)
8 [LAMBDA OUT] val x = foo(<bold>fun(n: Int) = n</bold>)
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int) = n</bold>)
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return <bold>f(1)</bold>
3 fun <bold>foo(f: (Int) -> Int): Int {</bold>
8 val x = <bold>foo(fun(n: Int) = n)</bold>
@@ -1,7 +1,7 @@
8 val x = foo(fun(n: Int): Int { return <bold>n</bold> })
8 val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
8 [LAMBDA OUT] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo(<bold>fun(n: Int): Int { return n }</bold>)
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return <bold>f(1)</bold>
3 fun <bold>foo(f: (Int) -> Int): Int {</bold>
8 val x = <bold>foo(fun(n: Int): Int { return n })</bold>
@@ -1,10 +1,10 @@
8 val x = foo(1, 2) { { <bold>it</bold> } }
8 val x = foo(1, 2) { <bold>{ it }</bold> }
8 [LAMBDA OUT] val x = foo(1, 2) { <bold>{ it }</bold> }
8 [LAMBDA OUT] val x = foo(1, 2) <bold>{ { it } }</bold>
8 [LAMBDA OUT] [LAMBDA OUT] val x = foo(1, 2) <bold>{ { it } }</bold>
3 [LAMBDA OUT] [LAMBDA OUT] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
4 [LAMBDA OUT] return <bold>f(a)</bold>(b)
8 [LAMBDA CALLS] val x = foo(1, 2) { <bold>{ it }</bold> }
8 [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
8 [LAMBDA CALLS] [LAMBDA CALLS] val x = foo(1, 2) <bold>{ { it } }</bold>
3 [LAMBDA CALLS] [LAMBDA CALLS] fun foo(a: Int, b: Int, <bold>f: (Int) -> (Int) -> Int</bold>): Int {
4 [LAMBDA CALLS] return <bold>f(a)</bold>(b)
4 return <bold>f(a)(b)</bold>
3 fun <bold>foo(a: Int, b: Int, f: (Int) -> (Int) -> Int): Int {</bold>
8 val x = <bold>foo(1, 2) { { it } }</bold>
@@ -1,7 +1,7 @@
9 if (it < 0) return@foo <bold>0</bold>
8 val x = foo <bold>{</bold>
8 [LAMBDA OUT] val x = foo <bold>{</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo <bold>{</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return <bold>f(1)</bold>
3 fun <bold>foo(f: (Int) -> Int): Int {</bold>
8 val x = <bold>foo {</bold>
@@ -1,7 +1,7 @@
8 fun bar(n: Int) = <bold>n</bold>
8 fun <bold>bar(n: Int) = n</bold>
9 [LAMBDA OUT] val x = foo(<bold>::bar</bold>)
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
9 [LAMBDA CALLS] val x = foo(<bold>::bar</bold>)
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return <bold>f(1)</bold>
3 fun <bold>foo(f: (Int) -> Int): Int {</bold>
9 val x = <bold>foo(::bar)</bold>
@@ -1,9 +1,9 @@
8 fun bar(n: Int) = <bold>n</bold>
8 fun <bold>bar(n: Int) = n</bold>
9 [LAMBDA OUT] val f = <bold>::bar</bold>
9 [LAMBDA OUT] val <bold>f = ::bar</bold>
10 [LAMBDA OUT] val x = foo(<bold>f</bold>)
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
9 [LAMBDA CALLS] val f = <bold>::bar</bold>
9 [LAMBDA CALLS] val <bold>f = ::bar</bold>
10 [LAMBDA CALLS] val x = foo(<bold>f</bold>)
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return <bold>f(1)</bold>
3 fun <bold>foo(f: (Int) -> Int): Int {</bold>
10 val x = <bold>foo(f)</bold>
@@ -1,5 +1,5 @@
4 fun bar(n: Int) = <bold>n</bold>
4 fun <bold>bar(n: Int) = n</bold>
5 [LAMBDA OUT] val x = (<bold>::bar</bold>)(1)
5 [LAMBDA CALLS] val x = (<bold>::bar</bold>)(1)
5 val x = <bold>(::bar)(1)</bold>
5 val <bold>x = (::bar)(1)</bold>
+2 -2
View File
@@ -1,7 +1,7 @@
8 val x = foo { <bold>it</bold> }
8 val x = foo <bold>{ it }</bold>
8 [LAMBDA OUT] val x = foo <bold>{ it }</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
8 [LAMBDA CALLS] val x = foo <bold>{ it }</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 return <bold>f(1)</bold>
3 fun <bold>foo(f: (Int) -> Int): Int {</bold>
8 val x = <bold>foo { it }</bold>
@@ -1,9 +1,9 @@
9 val y = foo { <bold>it</bold> }
9 val y = foo <bold>{ it }</bold>
9 [LAMBDA OUT] val y = foo <bold>{ it }</bold>
3 [LAMBDA OUT] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 [LAMBDA OUT] val x = <bold>f</bold>
4 [LAMBDA OUT] val <bold>x = f</bold>
9 [LAMBDA CALLS] val y = foo <bold>{ it }</bold>
3 [LAMBDA CALLS] fun foo(<bold>f: (Int) -> Int</bold>): Int {
4 [LAMBDA CALLS] val x = <bold>f</bold>
4 [LAMBDA CALLS] val <bold>x = f</bold>
5 return <bold>x(1)</bold>
3 fun <bold>foo(f: (Int) -> Int): Int {</bold>
9 val y = <bold>foo { it }</bold>
@@ -1,5 +1,5 @@
4 val x = { <bold>1</bold> }()
4 val x = <bold>{ 1 }</bold>()
4 [LAMBDA OUT] val x = <bold>{ 1 }</bold>()
4 [LAMBDA CALLS] val x = <bold>{ 1 }</bold>()
4 val x = <bold>{ 1 }()</bold>
4 val <bold>x = { 1 }()</bold>
@@ -1,6 +1,6 @@
4 val f = { <bold>1</bold> }
4 val f = <bold>{ 1 }</bold>
4 [LAMBDA OUT] val f = <bold>{ 1 }</bold>
4 [LAMBDA OUT] val <bold>f = { 1 }</bold>
4 [LAMBDA CALLS] val f = <bold>{ 1 }</bold>
4 [LAMBDA CALLS] val <bold>f = { 1 }</bold>
5 val x = <bold>f()</bold>
5 val <bold>x = f()</bold>