Imports on paste: do not suggest to import already imported extensions

This commit is contained in:
Valentin Kipyatkov
2015-04-08 20:07:46 +03:00
parent 0abc912208
commit 8d31a5c3a6
8 changed files with 64 additions and 14 deletions
@@ -0,0 +1,3 @@
package dependency
fun String.extensionFun() {}
@@ -0,0 +1,8 @@
fun foo() {
s.extensionFun()
for (i in s.indices) {
val pair = s to null
val s1 = s + "1"
}
}
@@ -0,0 +1,10 @@
// RUNTIME
// ALLOW_UNRESOLVED
fun foo(s: String) {
<selection> s.extensionFun()
for (i in s.indices) {
val pair = s to null
val s1 = s + "1"
}
</selection>}
@@ -0,0 +1,3 @@
fun foo() {
<caret>
}