FIR IDE: Add more correct importing of the callables

Now we use scopes to decide if the callable really needs to be inserted
This commit is contained in:
Roman Golyshev
2021-03-03 18:40:36 +03:00
parent 76ff106458
commit 7b7ba717d0
14 changed files with 142 additions and 21 deletions
@@ -0,0 +1,12 @@
// FIR_COMPARISON
package test
class AClass
val AClass.ext get() = this
fun usage(a: AClass) {
a.ex<caret>
}
// ELEMENT: ext
@@ -0,0 +1,12 @@
// FIR_COMPARISON
package test
class AClass
val AClass.ext get() = this
fun usage(a: AClass) {
a.ext<caret>
}
// ELEMENT: ext
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package first
fun foo() {
"".extensi<caret>
}
@@ -0,0 +1,4 @@
package first
val String.extensionProp: Int
get() = 1
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package first
fun foo() {
"".extensionProp<caret>
}
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package some
fun other() {
somePr<caret>
}
@@ -0,0 +1,4 @@
// FIR_COMPARISON
package some
val someProp: Int = 1
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package some
fun other() {
someProp<caret>
}