Skip to content

Commit

Permalink
One more test
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinkip committed Apr 17, 2020
1 parent cc60903 commit 8a1ea7b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
9 changes: 9 additions & 0 deletions idea/testData/slicer/outflow/invokeExtensionLambda2.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// FLOW: OUT

fun String.foo(<caret>p: String) {
val v1 = bar(p) { { this } }
}

inline fun bar(x: String, lambda: () -> String.() -> String): String {
return lambda()(x)
}
20 changes: 20 additions & 0 deletions idea/testData/slicer/outflow/invokeExtensionLambda2.results.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
3 fun String.foo(<bold>p: String</bold>) {
4 val v1 = bar(<bold>p</bold>) { { this } }
7 (INLINE CALL bar) inline fun bar(<bold>x: String</bold>, lambda: () -> String.() -> String): String {
8 (INLINE CALL bar) return lambda()(<bold>x</bold>)
8 (INLINE CALL bar) [LAMBDA RECEIVER IN] return <bold>lambda()</bold>(x)
8 (INLINE CALL bar) [LAMBDA IN] [LAMBDA RECEIVER IN] return <bold>lambda</bold>()(x)
7 (INLINE CALL bar) [LAMBDA IN] [LAMBDA RECEIVER IN] inline fun bar(x: String, <bold>lambda: () -> String.() -> String</bold>): String {
4 [LAMBDA IN] [LAMBDA RECEIVER IN] val v1 = bar(p) <bold>{ { this } }</bold>
4 [LAMBDA RECEIVER IN] val v1 = bar(p) <bold>{ { this } }</bold>
4 [LAMBDA RECEIVER IN] val v1 = bar(p) { <bold>{ this }</bold> }
4 val v1 = bar(p) { { <bold>this</bold> } }
4 val v1 = bar(p) { <bold>{ this }</bold> }
4 [LAMBDA CALLS] val v1 = bar(p) { <bold>{ this }</bold> }
4 [LAMBDA CALLS] val v1 = bar(p) <bold>{ { this } }</bold>
4 [LAMBDA CALLS] [LAMBDA CALLS] val v1 = bar(p) <bold>{ { this } }</bold>
7 (INLINE CALL bar) [LAMBDA CALLS] [LAMBDA CALLS] inline fun bar(x: String, <bold>lambda: () -> String.() -> String</bold>): String {
8 (INLINE CALL bar) [LAMBDA CALLS] return <bold>lambda()</bold>(x)
8 (INLINE CALL bar) return <bold>lambda()(x)</bold>
4 val v1 = <bold>bar(p) { { this } }</bold>
4 val <bold>v1 = bar(p) { { this } }</bold>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8a1ea7b

Please sign in to comment.