Do not include line numbers from librarys source into test output otherwise it will change to often when upgrading libs

This commit is contained in:
Valentin Kipyatkov
2020-04-13 23:05:39 +03:00
parent d6e8cdebfb
commit 2d2d9337ca
14 changed files with 74 additions and 65 deletions
@@ -2,8 +2,8 @@
6 val <bold>v = this</bold> 6 val <bold>v = this</bold>
6 val v = <bold>this</bold> 6 val v = <bold>this</bold>
5 [LAMBDA CALLS RECEIVER] with("A") <bold>{</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 { LIB (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() LIB (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 { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
5 with(<bold>"A"</bold>) { 5 with(<bold>"A"</bold>) {
@@ -1,7 +1,7 @@
6 val <bold>v = this</bold> 6 val <bold>v = this</bold>
6 val v = <bold>this</bold> 6 val v = <bold>this</bold>
5 [LAMBDA CALLS RECEIVER] with("A") <bold>{</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 { LIB (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() LIB (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 { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
5 with(<bold>"A"</bold>) { 5 with(<bold>"A"</bold>) {
@@ -1,8 +1,8 @@
4 class <bold>C</bold> 4 class <bold>C</bold>
12 fun <bold>C</bold>.extensionFun() {} 12 fun <bold>C</bold>.extensionFun() {}
7 [LAMBDA CALLS RECEIVER] val c = C().apply <bold>{</bold> 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 { LIB (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 { LIB (INLINE CALL apply) public inline fun <T> <bold>T</bold>.apply(block: T.() -> Unit): T {
7 val c = <bold>C()</bold>.apply { 7 val c = <bold>C()</bold>.apply {
4 class <bold>C</bold> 4 class <bold>C</bold>
@@ -2,7 +2,7 @@
7 val c = <bold>C()</bold>.apply { 7 val c = <bold>C()</bold>.apply {
12 fun <bold>C</bold>.extensionFun() {} 12 fun <bold>C</bold>.extensionFun() {}
7 [LAMBDA CALLS RECEIVER] val c = C().apply <bold>{</bold> 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 { LIB (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 { LIB (INLINE CALL apply) public inline fun <T> <bold>T</bold>.apply(block: T.() -> Unit): T {
7 val c = <bold>C()</bold>.apply { 7 val c = <bold>C()</bold>.apply {
@@ -1,6 +1,6 @@
12 fun <bold>C</bold>.extensionFun() {} 12 fun <bold>C</bold>.extensionFun() {}
7 [LAMBDA CALLS RECEIVER] val c = C().apply <bold>{</bold> 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 { LIB (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 { LIB (INLINE CALL apply) public inline fun <T> <bold>T</bold>.apply(block: T.() -> Unit): T {
7 val c = <bold>C()</bold>.apply { 7 val c = <bold>C()</bold>.apply {
4 class <bold>C</bold> 4 class <bold>C</bold>
@@ -20,9 +20,9 @@
4 fun <bold>Any</bold>.extensionFun() { 4 fun <bold>Any</bold>.extensionFun() {
29 <bold>it</bold>.extensionFun() 29 <bold>it</bold>.extensionFun()
28 [LAMBDA CALLS ARGUMENT #0] "A".let <bold>{</bold> 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 { LIB (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>) LIB (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 { LIB (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
28 <bold>"A"</bold>.let { 28 <bold>"A"</bold>.let {
20 withNoInline(<bold>1</bold>) { 20 withNoInline(<bold>1</bold>) {
@@ -23,7 +23,7 @@
51 val result = <bold>receiver</bold>.block() 51 val result = <bold>receiver</bold>.block()
50 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R { 50 fun <T, R> withNoInline(<bold>receiver: T</bold>, block: T.() -> R): R {
24 withNoInline(<bold>2</bold>) { 24 withNoInline(<bold>2</bold>) {
37 <bold>it</bold>.extensionFun() 29 <bold>it</bold>.extensionFun()
4 fun <bold>Any</bold>.extensionFun() { 4 fun <bold>Any</bold>.extensionFun() {
29 <bold>it</bold>.extensionFun() 29 <bold>it</bold>.extensionFun()
37 <bold>it</bold>.extensionFun() 37 <bold>it</bold>.extensionFun()
@@ -18,9 +18,9 @@
24 withNoInline(<bold>2</bold>) { 24 withNoInline(<bold>2</bold>) {
29 <bold>it</bold>.extensionFun() 29 <bold>it</bold>.extensionFun()
28 [LAMBDA CALLS ARGUMENT #0] "A".let <bold>{</bold> 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 { LIB (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>) LIB (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 { LIB (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
28 <bold>"A"</bold>.let { 28 <bold>"A"</bold>.let {
37 <bold>it</bold>.extensionFun() 37 <bold>it</bold>.extensionFun()
36 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold> 36 [LAMBDA CALLS ARGUMENT #0] "D".letNoInline <bold>{</bold>
@@ -18,8 +18,8 @@
18 with(<bold>123</bold>) { 18 with(<bold>123</bold>) {
8 fun <bold>Any</bold>.extensionFun() { 8 fun <bold>Any</bold>.extensionFun() {
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold> 18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
66 (INLINE CALL with) [LAMBDA CALLS RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (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() LIB (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 { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
18 with(<bold>123</bold>) { 18 with(<bold>123</bold>) {
@@ -8,9 +8,9 @@
18 with(<bold>123</bold>) { 18 with(<bold>123</bold>) {
8 fun <bold>Any</bold>.extensionFun() { 8 fun <bold>Any</bold>.extensionFun() {
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold> 18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
66 (INLINE CALL with) [LAMBDA CALLS RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (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() LIB (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 { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
18 with(<bold>123</bold>) { 18 with(<bold>123</bold>) {
24 <bold>"A"</bold>.foo() 24 <bold>"A"</bold>.foo()
8 fun <bold>Any</bold>.extensionFun() { 8 fun <bold>Any</bold>.extensionFun() {
@@ -5,7 +5,7 @@
12 <bold>""</bold>.extensionFun() 12 <bold>""</bold>.extensionFun()
14 <bold>1</bold>.extensionFun() 14 <bold>1</bold>.extensionFun()
18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold> 18 [LAMBDA CALLS RECEIVER] with(123) <bold>{</bold>
66 (INLINE CALL with) [LAMBDA CALLS RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (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() LIB (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 { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
18 with(<bold>123</bold>) { 18 with(<bold>123</bold>) {
+18 -18
View File
@@ -1,8 +1,8 @@
4 fun foo(<bold>p: String</bold>) { 4 fun foo(<bold>p: String</bold>) {
5 val v1 = <bold>p</bold>.let { value -> bar(value) } 5 val v1 = <bold>p</bold>.let { value -> bar(value) }
108 (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R { LIB (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
112 (INLINE CALL let) return block(<bold>this</bold>) LIB (INLINE CALL let) return block(<bold>this</bold>)
108 (INLINE CALL let) [LAMBDA PARAMETER #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R { LIB (INLINE CALL let) [LAMBDA PARAMETER #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
5 [LAMBDA PARAMETER #0] val v1 = p.let <bold>{ value -> bar(value) }</bold> 5 [LAMBDA PARAMETER #0] val v1 = p.let <bold>{ value -> bar(value) }</bold>
5 val v1 = p.let { <bold>value</bold> -> bar(value) } 5 val v1 = p.let { <bold>value</bold> -> bar(value) }
5 val v1 = p.let { value -> bar(<bold>value</bold>) } 5 val v1 = p.let { value -> bar(<bold>value</bold>) }
@@ -12,37 +12,37 @@
5 val v1 = p.let { value -> <bold>bar(value)</bold> } 5 val v1 = p.let { value -> <bold>bar(value)</bold> }
5 val v1 = p.let <bold>{ value -> bar(value) }</bold> 5 val v1 = p.let <bold>{ value -> bar(value) }</bold>
5 [LAMBDA CALLS] val v1 = p.let <bold>{ value -> bar(value) }</bold> 5 [LAMBDA CALLS] val v1 = p.let <bold>{ value -> bar(value) }</bold>
108 (INLINE CALL let) [LAMBDA CALLS] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R { LIB (INLINE CALL let) [LAMBDA CALLS] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
112 (INLINE CALL let) return <bold>block(this)</bold> LIB (INLINE CALL let) return <bold>block(this)</bold>
5 val v1 = p.<bold>let { value -> bar(value) }</bold> 5 val v1 = p.<bold>let { value -> bar(value) }</bold>
5 val <bold>v1 = p.let { value -> bar(value) }</bold> 5 val <bold>v1 = p.let { value -> bar(value) }</bold>
7 val v2 = <bold>p</bold>.let { it } 7 val v2 = <bold>p</bold>.let { it }
108 (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R { LIB (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
112 (INLINE CALL let) return block(<bold>this</bold>) LIB (INLINE CALL let) return block(<bold>this</bold>)
108 (INLINE CALL let) [LAMBDA PARAMETER #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R { LIB (INLINE CALL let) [LAMBDA PARAMETER #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
7 [LAMBDA PARAMETER #0] val v2 = p.let <bold>{ it }</bold> 7 [LAMBDA PARAMETER #0] val v2 = p.let <bold>{ it }</bold>
7 val v2 = p.let { <bold>it</bold> } 7 val v2 = p.let { <bold>it</bold> }
7 val v2 = p.let <bold>{ it }</bold> 7 val v2 = p.let <bold>{ it }</bold>
7 [LAMBDA CALLS] val v2 = p.let <bold>{ it }</bold> 7 [LAMBDA CALLS] val v2 = p.let <bold>{ it }</bold>
108 (INLINE CALL let) [LAMBDA CALLS] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R { LIB (INLINE CALL let) [LAMBDA CALLS] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
112 (INLINE CALL let) return <bold>block(this)</bold> LIB (INLINE CALL let) return <bold>block(this)</bold>
7 val v2 = p.<bold>let { it }</bold> 7 val v2 = p.<bold>let { it }</bold>
7 val <bold>v2 = p.let { it }</bold> 7 val <bold>v2 = p.let { it }</bold>
9 val v3 = <bold>p</bold>.let { 9 val v3 = <bold>p</bold>.let {
108 (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R { LIB (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
112 (INLINE CALL let) return block(<bold>this</bold>) LIB (INLINE CALL let) return block(<bold>this</bold>)
108 (INLINE CALL let) [LAMBDA PARAMETER #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R { LIB (INLINE CALL let) [LAMBDA PARAMETER #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
9 [LAMBDA PARAMETER #0] val v3 = p.let <bold>{</bold> 9 [LAMBDA PARAMETER #0] val v3 = p.let <bold>{</bold>
14 val v4 = <bold>p</bold>.let(::zoo) 14 val v4 = <bold>p</bold>.let(::zoo)
108 (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R { LIB (INLINE CALL let) public inline fun <T, R> <bold>T</bold>.let(block: (T) -> R): R {
112 (INLINE CALL let) return block(<bold>this</bold>) LIB (INLINE CALL let) return block(<bold>this</bold>)
108 (INLINE CALL let) [LAMBDA PARAMETER #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R { LIB (INLINE CALL let) [LAMBDA PARAMETER #0] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
14 [LAMBDA PARAMETER #0] val v4 = p.let(<bold>::zoo</bold>) 14 [LAMBDA PARAMETER #0] val v4 = p.let(<bold>::zoo</bold>)
18 fun zoo(<bold>s: String</bold>) = s 18 fun zoo(<bold>s: String</bold>) = s
18 fun zoo(s: String) = <bold>s</bold> 18 fun zoo(s: String) = <bold>s</bold>
18 fun <bold>zoo(s: String) = s</bold> 18 fun <bold>zoo(s: String) = s</bold>
14 [LAMBDA CALLS] val v4 = p.let(<bold>::zoo</bold>) 14 [LAMBDA CALLS] val v4 = p.let(<bold>::zoo</bold>)
108 (INLINE CALL let) [LAMBDA CALLS] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R { LIB (INLINE CALL let) [LAMBDA CALLS] public inline fun <T, R> T.let(<bold>block: (T) -> R</bold>): R {
112 (INLINE CALL let) return <bold>block(this)</bold> LIB (INLINE CALL let) return <bold>block(this)</bold>
14 val v4 = p.<bold>let(::zoo)</bold> 14 val v4 = p.<bold>let(::zoo)</bold>
14 val <bold>v4 = p.let(::zoo)</bold> 14 val <bold>v4 = p.let(::zoo)</bold>
+18 -18
View File
@@ -1,20 +1,20 @@
4 fun String.foo(<bold>p: String</bold>) { 4 fun String.foo(<bold>p: String</bold>) {
5 val v1 = with(<bold>p</bold>) { this } 5 val v1 = with(<bold>p</bold>) { this }
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block() LIB (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) [LAMBDA RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (INLINE CALL with) [LAMBDA RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
5 [LAMBDA RECEIVER] val v1 = with(p) <bold>{ this }</bold> 5 [LAMBDA RECEIVER] val v1 = with(p) <bold>{ this }</bold>
5 val v1 = with(p) { <bold>this</bold> } 5 val v1 = with(p) { <bold>this</bold> }
5 val v1 = with(p) <bold>{ this }</bold> 5 val v1 = with(p) <bold>{ this }</bold>
5 [LAMBDA CALLS] val v1 = with(p) <bold>{ this }</bold> 5 [LAMBDA CALLS] val v1 = with(p) <bold>{ this }</bold>
66 (INLINE CALL with) [LAMBDA CALLS] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (INLINE CALL with) [LAMBDA CALLS] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
70 (INLINE CALL with) return receiver.<bold>block()</bold> LIB (INLINE CALL with) return receiver.<bold>block()</bold>
5 val v1 = <bold>with(p) { this }</bold> 5 val v1 = <bold>with(p) { this }</bold>
5 val <bold>v1 = with(p) { this }</bold> 5 val <bold>v1 = with(p) { this }</bold>
7 val v2 = with(<bold>p</bold>) { bar(this) } 7 val v2 = with(<bold>p</bold>) { bar(this) }
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block() LIB (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) [LAMBDA RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (INLINE CALL with) [LAMBDA RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
7 [LAMBDA RECEIVER] val v2 = with(p) <bold>{ bar(this) }</bold> 7 [LAMBDA RECEIVER] val v2 = with(p) <bold>{ bar(this) }</bold>
7 val v2 = with(p) { bar(<bold>this</bold>) } 7 val v2 = with(p) { bar(<bold>this</bold>) }
14 fun bar(<bold>s: String</bold>) = s 14 fun bar(<bold>s: String</bold>) = s
@@ -23,25 +23,25 @@
7 val v2 = with(p) { <bold>bar(this)</bold> } 7 val v2 = with(p) { <bold>bar(this)</bold> }
7 val v2 = with(p) <bold>{ bar(this) }</bold> 7 val v2 = with(p) <bold>{ bar(this) }</bold>
7 [LAMBDA CALLS] val v2 = with(p) <bold>{ bar(this) }</bold> 7 [LAMBDA CALLS] val v2 = with(p) <bold>{ bar(this) }</bold>
66 (INLINE CALL with) [LAMBDA CALLS] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (INLINE CALL with) [LAMBDA CALLS] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
70 (INLINE CALL with) return receiver.<bold>block()</bold> LIB (INLINE CALL with) return receiver.<bold>block()</bold>
7 val v2 = <bold>with(p) { bar(this) }</bold> 7 val v2 = <bold>with(p) { bar(this) }</bold>
7 val <bold>v2 = with(p) { bar(this) }</bold> 7 val <bold>v2 = with(p) { bar(this) }</bold>
9 val v3 = with(<bold>p</bold>) { this@foo } 9 val v3 = with(<bold>p</bold>) { this@foo }
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block() LIB (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) [LAMBDA RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (INLINE CALL with) [LAMBDA RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
9 [LAMBDA RECEIVER] val v3 = with(p) <bold>{ this@foo }</bold> 9 [LAMBDA RECEIVER] val v3 = with(p) <bold>{ this@foo }</bold>
11 val v4 = with(<bold>p</bold>, ::zoo) 11 val v4 = with(<bold>p</bold>, ::zoo)
66 (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R { LIB (INLINE CALL with) public inline fun <T, R> with(<bold>receiver: T</bold>, block: T.() -> R): R {
70 (INLINE CALL with) return <bold>receiver</bold>.block() LIB (INLINE CALL with) return <bold>receiver</bold>.block()
66 (INLINE CALL with) [LAMBDA RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (INLINE CALL with) [LAMBDA RECEIVER] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
11 [LAMBDA RECEIVER] val v4 = with(p, <bold>::zoo</bold>) 11 [LAMBDA RECEIVER] val v4 = with(p, <bold>::zoo</bold>)
15 fun zoo(<bold>s: String</bold>) = s 15 fun zoo(<bold>s: String</bold>) = s
15 fun zoo(s: String) = <bold>s</bold> 15 fun zoo(s: String) = <bold>s</bold>
15 fun <bold>zoo(s: String) = s</bold> 15 fun <bold>zoo(s: String) = s</bold>
11 [LAMBDA CALLS] val v4 = with(p, <bold>::zoo</bold>) 11 [LAMBDA CALLS] val v4 = with(p, <bold>::zoo</bold>)
66 (INLINE CALL with) [LAMBDA CALLS] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R { LIB (INLINE CALL with) [LAMBDA CALLS] public inline fun <T, R> with(receiver: T, <bold>block: T.() -> R</bold>): R {
70 (INLINE CALL with) return receiver.<bold>block()</bold> LIB (INLINE CALL with) return receiver.<bold>block()</bold>
11 val v4 = <bold>with(p, ::zoo)</bold> 11 val v4 = <bold>with(p, ::zoo)</bold>
11 val <bold>v4 = with(p, ::zoo)</bold> 11 val <bold>v4 = with(p, ::zoo)</bold>
@@ -8,12 +8,14 @@ package org.jetbrains.kotlin.idea.slicer
import com.intellij.analysis.AnalysisScope import com.intellij.analysis.AnalysisScope
import com.intellij.ide.projectView.TreeStructureProvider import com.intellij.ide.projectView.TreeStructureProvider
import com.intellij.ide.util.treeView.AbstractTreeStructureBase import com.intellij.ide.util.treeView.AbstractTreeStructureBase
import com.intellij.psi.search.GlobalSearchScope
import com.intellij.slicer.DuplicateMap import com.intellij.slicer.DuplicateMap
import com.intellij.slicer.SliceAnalysisParams import com.intellij.slicer.SliceAnalysisParams
import com.intellij.slicer.SliceNode import com.intellij.slicer.SliceNode
import com.intellij.slicer.SliceRootNode import com.intellij.slicer.SliceRootNode
import com.intellij.usages.TextChunk import com.intellij.usages.TextChunk
import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.psi.KtFile
import org.jetbrains.kotlin.psi.psiUtil.contains
import org.jetbrains.kotlin.psi.psiUtil.startOffset import org.jetbrains.kotlin.psi.psiUtil.startOffset
import org.jetbrains.kotlin.test.InTextDirectivesUtils import org.jetbrains.kotlin.test.InTextDirectivesUtils
import java.awt.Font import java.awt.Font
@@ -30,6 +32,9 @@ internal class TestSliceTreeStructure(private val rootNode: SliceNode) : Abstrac
} }
internal fun buildTreeRepresentation(rootNode: SliceNode): String { internal fun buildTreeRepresentation(rootNode: SliceNode): String {
val project = rootNode.element!!.project!!
val projectScope = GlobalSearchScope.projectScope(project)
fun TextChunk.render(): String { fun TextChunk.render(): String {
var text = text var text = text
if (attributes.fontType == Font.BOLD) { if (attributes.fontType == Font.BOLD) {
@@ -58,7 +63,11 @@ internal fun buildTreeRepresentation(rootNode: SliceNode): String {
else -> { else -> {
val chunks = usage.text val chunks = usage.text
append(chunks.first().render() + " ") if (!projectScope.contains(usage.element)) {
append("LIB ")
} else {
append(chunks.first().render() + " ")
}
append("\t".repeat(indent)) append("\t".repeat(indent))
if (usage is KotlinSliceDereferenceUsage) { if (usage is KotlinSliceDereferenceUsage) {
append("DEREFERENCE: ") append("DEREFERENCE: ")