Find Usages: Fix processing of label references in 'return' expressions

#KT-7516 Fixed
This commit is contained in:
Alexey Sedunov
2017-02-17 15:03:50 +03:00
parent 275cdbbea7
commit 5e8cd654ec
4 changed files with 42 additions and 0 deletions
@@ -0,0 +1,12 @@
// PSI_ELEMENT: org.jetbrains.kotlin.psi.KtNamedFunction
// OPTIONS: usages
fun <R> <caret>foo(f: () -> R) = f()
fun test() {
foo {
return@foo false
}
foo(fun(): Boolean { return@foo false })
}
@@ -0,0 +1,4 @@
Function call 11 foo(fun(): Boolean { return@foo false })
Function call 7 foo {
Unclassified usage 11 foo(fun(): Boolean { return@foo false })
Unclassified usage 8 return@foo false