ImportOptimizer: basic support for removing unresolved imports
#KT-32409 Fixed Part of #KT-31331
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package srt
|
||||
|
||||
import srt.A
|
||||
|
||||
const val A = 4
|
||||
|
||||
fun test(a: A) {
|
||||
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package srt
|
||||
|
||||
const val A = 4
|
||||
|
||||
fun test(a: A) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package srt
|
||||
|
||||
import srt.*
|
||||
|
||||
const val A = 4
|
||||
|
||||
fun test(b: A) {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package srt
|
||||
|
||||
import srt.*
|
||||
|
||||
const val A = 4
|
||||
|
||||
fun test(b: A) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package a.b
|
||||
|
||||
import a.*
|
||||
|
||||
class Foo(
|
||||
val bar: Bar
|
||||
)
|
||||
@@ -0,0 +1,7 @@
|
||||
package a.b
|
||||
|
||||
import a.*
|
||||
|
||||
class Foo(
|
||||
val bar: Bar
|
||||
)
|
||||
@@ -1,7 +1,6 @@
|
||||
import pack1.Class4
|
||||
import pack1.Example
|
||||
import pack2.*
|
||||
import pack3.Ggd
|
||||
|
||||
fun method(a: Class4) {
|
||||
Example()
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
package pack1
|
||||
|
||||
class Example
|
||||
class Class4
|
||||
@@ -0,0 +1,9 @@
|
||||
import pack1.Class4
|
||||
import pack1.Example
|
||||
import pack2.*
|
||||
import pack3.Ggd
|
||||
import pack4.Gga as Arrr
|
||||
|
||||
fun method(a: Class4) {
|
||||
Example()
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
import pack1.Class4
|
||||
import pack1.Example
|
||||
|
||||
fun method(a: Class4) {
|
||||
Example()
|
||||
}
|
||||
Reference in New Issue
Block a user