KT-4822 Wrong scope is used for local variable name completion

#KT-4822 Fixed
This commit is contained in:
Valentin Kipyatkov
2015-06-11 22:10:04 +03:00
parent 14ddc9d972
commit b301b22f47
14 changed files with 229 additions and 63 deletions
@@ -0,0 +1,18 @@
val xxx = 3
fun foo(xxx: Int) {
val xxx = 1.0
if (true) {
val xxx = 'c'
if (true) {
val xxx: Any = run {
val xxx: String = xx<caret>
}
}
}
}
// EXIST: { lookupString: "xxx", itemText: "xxx", typeText: "Char" }
// NOTHING_ELSE
@@ -0,0 +1,3 @@
val xxx: String = <caret>
// ABSENT: xxx
@@ -0,0 +1,5 @@
fun foo(p: () -> Unit): String = ""
val xxx: String = foo { <caret> }
// EXIST: xxx