@@ -7,9 +7,9 @@ import dotty.tools.dotc.config.ScalaSettings
7
7
import dotty .tools .dotc .core .Contexts .*
8
8
import dotty .tools .dotc .core .Flags .*
9
9
import dotty .tools .dotc .core .Names .{Name , SimpleName , DerivedName , TermName , termName }
10
- import dotty .tools .dotc .core .NameOps .{isAnonymousFunctionName , isReplWrapperName , setterName }
11
10
import dotty .tools .dotc .core .NameKinds .{
12
11
BodyRetainerName , ContextBoundParamName , ContextFunctionParamName , DefaultGetterName , WildcardParamName }
12
+ import dotty .tools .dotc .core .NameOps .{isAnonymousFunctionName , isReplWrapperName , setterName }
13
13
import dotty .tools .dotc .core .Scopes .newScope
14
14
import dotty .tools .dotc .core .StdNames .nme
15
15
import dotty .tools .dotc .core .Symbols .{ClassSymbol , NoSymbol , Symbol , defn , isDeprecated , requiredClass , requiredModule }
@@ -27,7 +27,6 @@ import dotty.tools.dotc.util.chaining.*
27
27
28
28
import java .util .IdentityHashMap
29
29
30
- import scala .annotation .*
31
30
import scala .collection .mutable , mutable .{ArrayBuilder , ListBuffer , Stack }
32
31
33
32
import CheckUnused .*
@@ -725,9 +724,6 @@ object CheckUnused:
725
724
import Rewrites .ActionPatch
726
725
type ImpSel = (Import , ImportSelector )
727
726
def isUsed (sel : ImportSelector ): Boolean = infos.sels.containsKey(sel)
728
- @ unused // avoid merge conflict
729
- def isUsable (imp : Import , sel : ImportSelector ): Boolean =
730
- sel.isImportExclusion || infos.sels.containsKey(sel)
731
727
def warnImport (warnable : ImpSel , actions : List [CodeAction ] = Nil ): Unit =
732
728
val (imp, sel) = warnable
733
729
val msg = UnusedSymbol .imports(actions)
@@ -1025,11 +1021,6 @@ object CheckUnused:
1025
1021
def boundTpe : Type = sel.bound match
1026
1022
case untpd.TypedSplice (tree) => tree.tpe
1027
1023
case _ => NoType
1028
- /** Is a "masking" import of the form import `qual.member as _`.
1029
- * Both conditions must be checked.
1030
- */
1031
- @ unused // matchingSelector checks isWildcard first
1032
- def isImportExclusion : Boolean = sel.isUnimport && ! sel.isWildcard
1033
1024
1034
1025
extension (imp : Import )(using Context )
1035
1026
/** Is it the first import clause in a statement? `a.x` in `import a.x, b.{y, z}` */
0 commit comments