Skip to content

Commit ce5d528

Browse files
committed
remove redundant compatnion object
1 parent 27105df commit ce5d528

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

compiler/src/dotty/tools/repl/transform/CollectTopLevelImports.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.ast.untpd
55
import dotty.tools.dotc.core.Contexts._
66
import dotty.tools.dotc.core.Names.Name
77
import dotty.tools.dotc.core.Phases.Phase
8-
import dotty.tools.dotc.core.StdNames.ScalaTermNames
8+
import dotty.tools.dotc.core.StdNames.nme
99

1010

1111
/** This phase collects and transforms top-level Import trees to handle definition shadowing.
@@ -61,7 +61,7 @@ class CollectTopLevelImports extends Phase {
6161

6262
val shadowedMembers = importedNames.intersect(definitionsAfterImport)
6363
val adjustedSelectors = shadowedMembers.map(collidingMember => {
64-
untpd.ImportSelector(untpd.Ident(collidingMember), untpd.Ident(CollectTopLevelImports.nme.WILDCARD))
64+
untpd.ImportSelector(untpd.Ident(collidingMember), untpd.Ident(nme.WILDCARD))
6565
})
6666

6767
val remainingSelectors = selectors.filterNot(importSelector => {
@@ -83,7 +83,3 @@ class CollectTopLevelImports extends Phase {
8383

8484
}
8585

86-
object CollectTopLevelImports {
87-
private lazy val nme: ScalaTermNames = new ScalaTermNames
88-
}
89-

0 commit comments

Comments
 (0)