Fix import quickfix if import has import alias

#KT-30669 Fixed
 #KT-7380 Fixed
 #KT-30663 Fixed
This commit is contained in:
Dmitry Gridin
2019-04-03 19:26:05 +07:00
parent 6caf6858fa
commit 4f8e29ad23
21 changed files with 165 additions and 9 deletions
@@ -0,0 +1,7 @@
// "Import" "true"
// ERROR: Unresolved reference: ImportedClass
import editor.completion.apx.ImportedClass as Class2
fun context() {
val c: Class2
}
@@ -0,0 +1,2 @@
package editor.completion.apx
class ImportedClass
@@ -0,0 +1,7 @@
// "Import" "true"
// ERROR: Unresolved reference: ImportedClass
import editor.completion.apx.ImportedClass as Class2
fun context() {
val c: <caret>ImportedClass
}
@@ -0,0 +1,8 @@
// "Import" "true"
// ERROR: Unresolved reference: ImportedClass
import editor.completion.apx.ImportedClass as Class2
fun context() {
class Class2
val c: editor.completion.apx.ImportedClass
}
@@ -0,0 +1,2 @@
package editor.completion.apx
class ImportedClass
@@ -0,0 +1,8 @@
// "Import" "true"
// ERROR: Unresolved reference: ImportedClass
import editor.completion.apx.ImportedClass as Class2
fun context() {
class Class2
val c: <caret>ImportedClass
}
@@ -0,0 +1,8 @@
// "Import" "true"
// ERROR: Unresolved reference: importedFunA
import editor.completion.apx.importedFunA as funA
fun context() {
val funA = 42
funA()
}
@@ -0,0 +1,2 @@
package editor.completion.apx
fun importedFunA() {}
@@ -0,0 +1,8 @@
// "Import" "true"
// ERROR: Unresolved reference: importedFunA
import editor.completion.apx.importedFunA as funA
fun context() {
val funA = 42
<caret>importedFunA()
}
@@ -0,0 +1,8 @@
// "Import" "true"
// ERROR: Unresolved reference: importedFunA
import editor.completion.apx.importedFunA as funA
fun context() {
fun funA() {}
editor.completion.apx.importedFunA()
}
@@ -0,0 +1,2 @@
package editor.completion.apx
fun importedFunA() {}
@@ -0,0 +1,8 @@
// "Import" "true"
// ERROR: Unresolved reference: importedFunA
import editor.completion.apx.importedFunA as funA
fun context() {
fun funA() {}
<caret>importedFunA()
}
@@ -0,0 +1,10 @@
// "Import" "true"
// WITH_RUNTIME
import kotlin.let as let1
fun main() {
1.<caret>let {
println(it)
}
}
@@ -0,0 +1,10 @@
// "Import" "true"
// WITH_RUNTIME
import kotlin.let as let1
fun main() {
1.let1 {
println(it)
}
}
@@ -0,0 +1,7 @@
// "Import" "true"
// ERROR: Unresolved reference: importedValA
import editor.completion.apx.importedValA as valA
fun context() {
valA()
}
@@ -0,0 +1,2 @@
package editor.completion.apx
val importedValA = ""
@@ -0,0 +1,7 @@
// "Import" "true"
// ERROR: Unresolved reference: importedValA
import editor.completion.apx.importedValA as valA
fun context() {
<caret>importedValA()
}