Optimize Imports: do not keep imports of unimportable entities
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package test
|
||||
|
||||
import dependency.*
|
||||
|
||||
fun f(a: A, t: T) {
|
||||
a.f()
|
||||
a.p
|
||||
t.f
|
||||
t.p
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package dependency
|
||||
|
||||
class A {
|
||||
fun f() {
|
||||
}
|
||||
|
||||
val p: Int = 1
|
||||
}
|
||||
|
||||
trait T {
|
||||
fun f() {
|
||||
}
|
||||
|
||||
val p: Int = 1
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package test
|
||||
|
||||
import dependency.*
|
||||
import dependency.A.f
|
||||
import dependency.A.p
|
||||
import dependency.T.f
|
||||
import dependency.T.p
|
||||
|
||||
fun f(a: A, t: T) {
|
||||
a.f()
|
||||
a.p
|
||||
t.f
|
||||
t.p
|
||||
}
|
||||
Reference in New Issue
Block a user