@@ -7,9 +7,9 @@ import dotty.tools.dotc.config.ScalaSettings
77import dotty .tools .dotc .core .Contexts .*
88import dotty .tools .dotc .core .Flags .*
99import dotty .tools .dotc .core .Names .{Name , SimpleName , DerivedName , TermName , termName }
10- import dotty .tools .dotc .core .NameOps .{isAnonymousFunctionName , isReplWrapperName , isContextFunction , setterName }
1110import dotty .tools .dotc .core .NameKinds .{
1211 BodyRetainerName , ContextBoundParamName , ContextFunctionParamName , DefaultGetterName , WildcardParamName }
12+ import dotty .tools .dotc .core .NameOps .{isAnonymousFunctionName , isReplWrapperName , isContextFunction , setterName }
1313import dotty .tools .dotc .core .Scopes .newScope
1414import dotty .tools .dotc .core .StdNames .nme
1515import dotty .tools .dotc .core .Symbols .{ClassSymbol , NoSymbol , Symbol , defn , isDeprecated , requiredClass , requiredModule }
@@ -27,7 +27,6 @@ import dotty.tools.dotc.util.chaining.*
2727
2828import java .util .IdentityHashMap
2929
30- import scala .annotation .*
3130import scala .collection .mutable , mutable .{ArrayBuilder , ListBuffer , Stack }
3231
3332import CheckUnused .*
@@ -693,9 +692,6 @@ object CheckUnused:
693692 import Rewrites .ActionPatch
694693 type ImpSel = (Import , ImportSelector )
695694 def isUsed (sel : ImportSelector ): Boolean = infos.sels.containsKey(sel)
696- @ unused // avoid merge conflict
697- def isUsable (imp : Import , sel : ImportSelector ): Boolean =
698- sel.isImportExclusion || infos.sels.containsKey(sel)
699695 def warnImport (warnable : ImpSel , actions : List [CodeAction ] = Nil ): Unit =
700696 val (imp, sel) = warnable
701697 val msg = UnusedSymbol .imports(actions)
@@ -993,11 +989,6 @@ object CheckUnused:
993989 def boundTpe : Type = sel.bound match
994990 case untpd.TypedSplice (tree) => tree.tpe
995991 case _ => NoType
996- /** Is a "masking" import of the form import `qual.member as _`.
997- * Both conditions must be checked.
998- */
999- @ unused // matchingSelector checks isWildcard first
1000- def isImportExclusion : Boolean = sel.isUnimport && ! sel.isWildcard
1001992
1002993 extension (imp : Import )(using Context )
1003994 /** Is it the first import clause in a statement? `a.x` in `import a.x, b.{y, z}` */
0 commit comments