FIR IDE: Add Add Import quickfix
This quickfix can import unresolved types and callables It currently does not support Java types and is not as advanced as in the old plugin Also, enable tests that now pass
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import importTrait.data.TestTrait
|
||||
|
||||
// "Import" "true"
|
||||
// FIR_IGNORE
|
||||
// ERROR: Unresolved reference: TestTrait
|
||||
|
||||
fun test() {
|
||||
val a: TestTrait<String, Int>? = null
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package importTrait.data
|
||||
|
||||
interface TestTrait<A, B>
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Import" "true"
|
||||
// FIR_IGNORE
|
||||
// ERROR: Unresolved reference: TestTrait
|
||||
|
||||
fun test() {
|
||||
val a: <caret>TestTrait<String, Int>? = null
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import importTrait.data.TestTrait
|
||||
|
||||
// "Import" "true"
|
||||
// IGNORE_FIR
|
||||
// ERROR: Unresolved reference: TestTrait
|
||||
|
||||
fun test() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Import" "true"
|
||||
// IGNORE_FIR
|
||||
// ERROR: Unresolved reference: TestTrait
|
||||
|
||||
fun test() {
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package sometest
|
||||
|
||||
private fun privateFun() {}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Import" "false"
|
||||
// ACTION: Create function 'privateFun'
|
||||
// ACTION: Rename reference
|
||||
// ERROR: Unresolved reference: privateFun
|
||||
|
||||
fun test() {
|
||||
<caret>privateFun()
|
||||
}
|
||||
Reference in New Issue
Block a user