ImportOptimizer: basic support for removing unresolved imports

#KT-32409 Fixed
Part of #KT-31331
This commit is contained in:
Dmitry Gridin
2020-06-17 16:10:21 +07:00
parent 8faced9192
commit 4de582564c
21 changed files with 165 additions and 16 deletions
@@ -0,0 +1,9 @@
package srt
import srt.A
const val A = 4
fun test(a: A) {
}
@@ -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) {
}
@@ -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()
}