Process imports for functioncs and properties in creating scope for file
during lazy resolve Fix for "KT-3096 No completion in function literal" and "KT-3102 No completion/auto-import for an extension method" #KT-3102 Fixed #KT-3096 Fixed
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package first
|
||||
|
||||
import second.testFun
|
||||
|
||||
fun test() {
|
||||
testFun().<caret>
|
||||
}
|
||||
|
||||
// EXIST: testMethod
|
||||
@@ -0,0 +1,9 @@
|
||||
package second
|
||||
|
||||
class TestSecond {
|
||||
fun testMethod() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun testFun() : TestSecond = TestSecond()
|
||||
@@ -0,0 +1,9 @@
|
||||
package first
|
||||
|
||||
// For KT-3102
|
||||
|
||||
import second.foo
|
||||
|
||||
fun test() = foo().ext<caret>
|
||||
|
||||
// EXIST: extensionFunction1, extensionFunction2
|
||||
@@ -0,0 +1,9 @@
|
||||
package second
|
||||
|
||||
class Some
|
||||
|
||||
// Two function to prevent automatic insert
|
||||
fun Some.extensionFunction1() = 12
|
||||
fun Some.extensionFunction2() = 12
|
||||
|
||||
fun foo() = Some()
|
||||
@@ -0,0 +1,11 @@
|
||||
package first
|
||||
|
||||
// For KT-3096 No completion in function literal
|
||||
|
||||
import second.someWithLiteral
|
||||
|
||||
fun test() {
|
||||
someWithLiteral({file -> file.testFu<caret>})
|
||||
}
|
||||
|
||||
// EXIST: testFunction1, testFunction2
|
||||
@@ -0,0 +1,9 @@
|
||||
package second
|
||||
|
||||
class Some {
|
||||
// Two function to prevent automatic insert
|
||||
fun testFunction1() : Int = 12
|
||||
fun testFunction2() : Int = 12
|
||||
}
|
||||
|
||||
fun someWithLiteral(body: (Some) -> Unit) = 12
|
||||
Reference in New Issue
Block a user