Non-imported extension functions and properties in smart completion + adding import on completing of non-imported property

This commit is contained in:
Valentin Kipyatkov
2014-09-16 15:35:22 +04:00
parent 507bfe49aa
commit 75f7f296aa
23 changed files with 304 additions and 133 deletions
@@ -0,0 +1,5 @@
package first
fun foo() {
"".ext<caret>
}
@@ -0,0 +1,4 @@
package second
val String.extensionProp: Int
get() = 1
@@ -0,0 +1,7 @@
package first
import second.extensionProp
fun foo() {
"".extensionProp<caret>
}
@@ -0,0 +1,5 @@
package some
fun other() {
somePr<caret>
}
@@ -0,0 +1,3 @@
package other
val someProp: Int = 1
@@ -0,0 +1,7 @@
package some
import other.someProp
fun other() {
someProp<caret>
}
@@ -0,0 +1 @@
fun foo(s: String): String = s.ext<caret>
@@ -0,0 +1,3 @@
package other
fun String.extensionFun() = ""
@@ -0,0 +1,3 @@
import other.extensionFun
fun foo(s: String): String = s.extensionFun()<caret>
@@ -0,0 +1 @@
fun foo(s: String): Int = s.ext<caret>
@@ -0,0 +1,3 @@
package other
val String.extensionProp: Int get() = this.size
@@ -0,0 +1,3 @@
import other.extensionProp
fun foo(s: String): Int = s.extensionProp<caret>