KT-9418 Suggest name for new declaration basing on unresolved names in code

#KT-9418 Fixed
This commit is contained in:
Valentin Kipyatkov
2016-01-15 13:27:53 +03:00
parent 83ca4b84f9
commit 28331bca9f
23 changed files with 614 additions and 116 deletions
@@ -0,0 +1,31 @@
// RUN_HIGHLIGHTING_BEFORE
fun foo(p: Int, x: UnresolvedClassName) {
unresolvedInFoo1()
if (p > 0) {
unresolvedInFoo2()
}
}
fun <caret>
fun bar() {
unresolvedInBar()
val v = unresolvedValue
listOf(1).filter(::unresolvedFunctionRef)
}
class C {
fun f() {
unresolvedInClass()
}
}
// EXIST: unresolvedInFoo1
// EXIST: unresolvedInFoo2
// EXIST: unresolvedInBar
// EXIST: unresolvedInClass
// ABSENT: UnresolvedClassName
// ABSENT: unresolvedValue
// EXIST: unresolvedFunctionRef