FIR IDE: Implement simple importing of the functions

This is not a complete algorithm, but it already works in many cases

Disable some tests that not yet work
This commit is contained in:
Roman Golyshev
2021-01-19 16:29:05 +03:00
committed by Space
parent 88e7d1e5ee
commit ee98a76600
21 changed files with 191 additions and 13 deletions
@@ -0,0 +1,10 @@
// FIR_COMPARISON
package test
fun foo(i: Int) {}
fun foo(s: String) {}
fun usage() {
<selection>test.foo()</selection>
}
@@ -0,0 +1,10 @@
// FIR_COMPARISON
package test
fun foo(i: Int) {}
fun foo(s: String) {}
fun usage() {
foo()
}
@@ -0,0 +1,5 @@
package dependency
fun foo(s: String) {}
fun foo(i: Int) {}
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package test
fun usage() {
<selection>dependency.foo()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
import dependency.foo
fun usage() {
foo()
}
@@ -0,0 +1,3 @@
package dependency
fun foo() {}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
fun foo() {}
fun usage() {
<selection>dependency.foo()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
fun foo() {}
fun usage() {
dependency.foo()
}
@@ -0,0 +1,3 @@
package dependency
fun foo(a: Any) {}
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package test
fun usage() {
<selection>dependency.foo()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
import dependency.foo
fun usage() {
foo()
}
@@ -0,0 +1,3 @@
package dependency
fun foo() {}
@@ -0,0 +1,6 @@
// FIR_COMPARISON
package test
fun usage() {
<selection>dependency.foo()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
import dependency.foo
fun usage() {
foo()
}
@@ -0,0 +1,3 @@
package dependency
class Foo
@@ -0,0 +1,6 @@
// FIR_IGNORE
package test
fun usage() {
<selection>dependency.Foo()</selection>
}
@@ -0,0 +1,8 @@
// FIR_COMPARISON
package test
import dependency.Foo
fun usage() {
Foo()
}
@@ -1,4 +1,4 @@
// FIR_COMPARISON
// FIR_IGNORE
package test
fun test() {}
@@ -1,4 +1,4 @@
// FIR_COMPARISON
// FIR_IGNORE
package test
class Foo