Skip to content

Commit 3469039

Browse files
committed
Clean up imports
Honor the new scheme where any explicit import of a root import will disable the root import.
1 parent f1151d6 commit 3469039

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object Trees {
3232
/** Property key for trees with documentation strings attached */
3333
val DocComment = new Property.Key[Comment]
3434

35-
@sharable private var nextId = 0 // for debugging
35+
@sharable private var nextId = 0 // for debugging
3636

3737
type LazyTree = AnyRef /* really: Tree | Lazy[Tree] */
3838
type LazyTreeList = AnyRef /* really: List[Tree] | Lazy[List[Tree]] */

compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import java.io.{
66
File, PrintWriter, PrintStream, StringWriter, Writer, OutputStream,
77
ByteArrayOutputStream => ByteOutputStream
88
}
9-
import java.lang.{Class, ClassLoader}
9+
import java.lang.{Class, ClassLoader, Thread, System, StringBuffer}
1010
import java.net.{URL, URLClassLoader}
1111

1212
import scala.collection.immutable.ListSet

compiler/src/dotty/tools/dotc/repl/InterpreterLoop.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package repl
44

55
import java.io.{BufferedReader, File, FileReader, PrintWriter}
66
import java.io.IOException
7-
import java.lang.{ClassLoader, System}
7+
import java.lang.{ClassLoader, System, Thread}
88
import scala.concurrent.{Future, Await}
99
import scala.concurrent.duration.Duration
1010
import reporting.Reporter

compiler/src/dotty/tools/dotc/transform/CollectEntryPoints.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import dotty.tools.dotc.core.Symbols.NoSymbol
99
import scala.annotation.tailrec
1010
import dotty.tools.dotc.core._
1111
import Symbols._
12-
import scala.Some
1312
import dotty.tools.dotc.transform.TreeTransforms.{NXTransformations, TransformerInfo, TreeTransform, TreeTransformer}
1413
import dotty.tools.dotc.ast.tpd
1514
import dotty.tools.dotc.core.Contexts.Context

compiler/src/dotty/tools/dotc/util/Chars.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package dotty.tools.dotc
66
package util
77

88
import scala.annotation.switch
9-
import java.lang.{ Character => JCharacter }
109
import java.lang.{Character => JCharacter}
1110
import java.lang.Character.LETTER_NUMBER
1211
import java.lang.Character.LOWERCASE_LETTER
@@ -66,16 +65,16 @@ object Chars {
6665

6766
/** Can character start an alphanumeric Scala identifier? */
6867
def isIdentifierStart(c: Char): Boolean =
69-
(c == '_') || (c == '$') || Character.isUnicodeIdentifierStart(c)
68+
(c == '_') || (c == '$') || JCharacter.isUnicodeIdentifierStart(c)
7069

7170
/** Can character form part of an alphanumeric Scala identifier? */
7271
def isIdentifierPart(c: Char) =
73-
(c == '$') || Character.isUnicodeIdentifierPart(c)
72+
(c == '$') || JCharacter.isUnicodeIdentifierPart(c)
7473

7574
/** Is character a math or other symbol in Unicode? */
7675
def isSpecial(c: Char) = {
77-
val chtp = Character.getType(c)
78-
chtp == Character.MATH_SYMBOL.toInt || chtp == Character.OTHER_SYMBOL.toInt
76+
val chtp = JCharacter.getType(c)
77+
chtp == JCharacter.MATH_SYMBOL.toInt || chtp == JCharacter.OTHER_SYMBOL.toInt
7978
}
8079

8180
private final val otherLetters = Set[Char]('\u0024', '\u005F') // '$' and '_'

0 commit comments

Comments
 (0)