Optimize Imports should remove unused import alias

#KT-17375 Fixed
This commit is contained in:
Dmitry Gridin
2019-04-29 17:04:53 +07:00
parent 7fe0503337
commit 96ed33e357
16 changed files with 90 additions and 66 deletions
@@ -1,4 +1,5 @@
import name
import name as names
val a = name
val a = name
val b = names
@@ -2,3 +2,4 @@ import name
import name as names
val a = name
val b = names
@@ -1,9 +1,8 @@
package test1
public class MyClass {
}
class MyClass
public fun MyClass.iterator(): Iterator<MyClass> {
operator fun MyClass.iterator(): Iterator<MyClass> {
return object: Iterator<MyClass> {
override fun next(): MyClass {
throw Exception()
@@ -1,5 +1,5 @@
// NAME_COUNT_TO_USE_STAR_IMPORT: 2
import p1.*
import p1.A
import p2.A
fun f() {
@@ -6,4 +6,3 @@ Additional checking of reference KtSimpleNameReference: A
Changed resolve of KtSimpleNameReference: A
Additional checking of reference KtInvokeFunctionReference: A("")
Additional checking of reference KtInvokeFunctionReference: A(1)
Trying to build import list again with import rules: +p2.A, +p1.*