diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2013-07-05 17:13:47 +0200 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2013-08-15 13:16:17 +0200 |
commit | 0459db43728e1dc38c3a1db6b7b1920810d0f858 (patch) | |
tree | 5565cd5e76fa6b40055156405da79f97553e76fd /src | |
parent | f670e28d4da648511063c6825905c4960ee94445 (diff) | |
download | scala-0459db43728e1dc38c3a1db6b7b1920810d0f858.tar.gz scala-0459db43728e1dc38c3a1db6b7b1920810d0f858.tar.bz2 scala-0459db43728e1dc38c3a1db6b7b1920810d0f858.zip |
SI-7624 Fix a few remaining -Xlint warnings ...
in various places. This includes actors, compiler (mostly some new
macro parts) continuations, partest, scaladoc, scalap.
Diffstat (limited to 'src')
25 files changed, 38 insertions, 70 deletions
diff --git a/src/actors/scala/actors/Scheduler.scala b/src/actors/scala/actors/Scheduler.scala index 5b5b4a946d..67c8e5cd10 100644 --- a/src/actors/scala/actors/Scheduler.scala +++ b/src/actors/scala/actors/Scheduler.scala @@ -9,7 +9,6 @@ package scala.actors -import java.util.concurrent._ import scheduler.{DelegatingScheduler, ForkJoinScheduler, ResizableThreadPoolScheduler, ThreadPoolConfig} /** diff --git a/src/actors/scala/actors/remote/TcpService.scala b/src/actors/scala/actors/remote/TcpService.scala index ad78ff784c..75e36b2738 100644 --- a/src/actors/scala/actors/remote/TcpService.scala +++ b/src/actors/scala/actors/remote/TcpService.scala @@ -67,7 +67,7 @@ object TcpService { timeout => try { val to = timeout.toInt - Debug.info("Using socket timeout $to") + Debug.info(s"Using socket timeout $to") Some(to) } catch { case e: NumberFormatException => diff --git a/src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala b/src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala index 32c6da8007..2e82e34bd9 100644 --- a/src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala +++ b/src/compiler/scala/reflect/macros/compiler/DefaultMacroCompiler.scala @@ -2,7 +2,6 @@ package scala.reflect.macros package compiler import scala.tools.nsc.Global -import scala.reflect.macros.contexts.Context abstract class DefaultMacroCompiler extends Resolvers with Validators @@ -11,7 +10,6 @@ abstract class DefaultMacroCompiler extends Resolvers import global._ val typer: global.analyzer.Typer - private implicit val context0 = typer.context val context = typer.context val macroDdef: DefDef diff --git a/src/compiler/scala/reflect/macros/compiler/Validators.scala b/src/compiler/scala/reflect/macros/compiler/Validators.scala index 60cfc94a23..fafd79d1d7 100644 --- a/src/compiler/scala/reflect/macros/compiler/Validators.scala +++ b/src/compiler/scala/reflect/macros/compiler/Validators.scala @@ -11,8 +11,6 @@ trait Validators { import global._ import analyzer._ import definitions._ - import treeInfo._ - import typer.infer._ def validateMacroImplRef() = { sanityCheck() diff --git a/src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala b/src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala index 3ef11fad9d..450cb4d9ea 100644 --- a/src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala +++ b/src/compiler/scala/reflect/macros/runtime/JavaReflectionRuntimes.scala @@ -10,8 +10,6 @@ trait JavaReflectionRuntimes { trait JavaReflectionResolvers { self: MacroRuntimeResolver => - import global._ - def resolveJavaReflectionRuntime(classLoader: ClassLoader): MacroRuntime = { val implClass = Class.forName(className, true, classLoader) val implMeths = implClass.getDeclaredMethods.find(_.getName == methName) diff --git a/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala b/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala index 0f89163803..ffdbe11151 100644 --- a/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala +++ b/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala @@ -1,11 +1,8 @@ package scala.reflect.macros package runtime -import scala.collection.mutable.{Map => MutableMap} import scala.reflect.internal.Flags._ import scala.reflect.runtime.ReflectionUtils -import scala.tools.nsc.util.ScalaClassLoader -import scala.tools.nsc.util.AbstractFileClassLoader trait MacroRuntimes extends JavaReflectionRuntimes with ScalaReflectionRuntimes { self: scala.tools.nsc.typechecker.Analyzer => diff --git a/src/compiler/scala/reflect/macros/runtime/ScalaReflectionRuntimes.scala b/src/compiler/scala/reflect/macros/runtime/ScalaReflectionRuntimes.scala index 1999e525ff..50f64310f8 100644 --- a/src/compiler/scala/reflect/macros/runtime/ScalaReflectionRuntimes.scala +++ b/src/compiler/scala/reflect/macros/runtime/ScalaReflectionRuntimes.scala @@ -9,8 +9,6 @@ trait ScalaReflectionRuntimes { trait ScalaReflectionResolvers { self: MacroRuntimeResolver => - import global._ - def resolveScalaReflectionRuntime(classLoader: ClassLoader): MacroRuntime = { val macroMirror: ru.JavaMirror = ru.runtimeMirror(classLoader) val implContainerSym = macroMirror.classSymbol(Class.forName(className, true, classLoader)) diff --git a/src/compiler/scala/reflect/macros/util/Helpers.scala b/src/compiler/scala/reflect/macros/util/Helpers.scala index 9b7680717e..f12582a3a1 100644 --- a/src/compiler/scala/reflect/macros/util/Helpers.scala +++ b/src/compiler/scala/reflect/macros/util/Helpers.scala @@ -23,7 +23,7 @@ trait Helpers { * or to streamline creation of the list of macro arguments. */ def transformTypeTagEvidenceParams(macroImplRef: Tree, transform: (Symbol, Symbol) => Symbol): List[List[Symbol]] = { - val treeInfo.MacroImplReference(isBundle, owner, macroImpl, _) = macroImplRef + val treeInfo.MacroImplReference(isBundle, _, macroImpl, _) = macroImplRef val paramss = macroImpl.paramss if (paramss.isEmpty || paramss.last.isEmpty) return paramss // no implicit parameters in the signature => nothing to do val rc = @@ -44,11 +44,6 @@ trait Helpers { if (transformed.isEmpty) paramss.init else paramss.init :+ transformed } - private def dealiasAndRewrap(tp: Type)(fn: Type => Type): Type = { - if (isRepeatedParamType(tp)) scalaRepeatedType(fn(tp.typeArgs.head.dealias)) - else fn(tp.dealias) - } - /** Increases metalevel of the type, i.e. transforms: * * T to c.Expr[T] * diff --git a/src/compiler/scala/tools/ant/sabbus/Settings.scala b/src/compiler/scala/tools/ant/sabbus/Settings.scala index 4cbc03d8d4..a86af73fe3 100644 --- a/src/compiler/scala/tools/ant/sabbus/Settings.scala +++ b/src/compiler/scala/tools/ant/sabbus/Settings.scala @@ -93,7 +93,7 @@ class Settings { case _ => false } - override lazy val hashCode: Int = Seq( + override lazy val hashCode: Int = Seq[Any]( gBf, uncheckedBf, classpathBf, diff --git a/src/compiler/scala/tools/cmd/CommandLineParser.scala b/src/compiler/scala/tools/cmd/CommandLineParser.scala index ef55178594..6132eff557 100644 --- a/src/compiler/scala/tools/cmd/CommandLineParser.scala +++ b/src/compiler/scala/tools/cmd/CommandLineParser.scala @@ -40,16 +40,16 @@ object CommandLineParser { // parse `in` for an argument, return it and the remainder of the input (or an error message) // (argument may be in single/double quotes, taking escaping into account, quotes are stripped) private def argument(in: String): Either[String, (String, String)] = in match { - case DoubleQuoted(arg, rest) => Right(arg, rest) - case SingleQuoted(arg, rest) => Right(arg, rest) - case Word(arg, rest) => Right(arg, rest) - case _ => Left("Illegal argument: "+ in) + case DoubleQuoted(arg, rest) => Right((arg, rest)) + case SingleQuoted(arg, rest) => Right((arg, rest)) + case Word(arg, rest) => Right((arg, rest)) + case _ => Left(s"Illegal argument: $in") } // parse a list of whitespace-separated arguments (ignoring whitespace in quoted arguments) @tailrec private def commandLine(in: String, accum: List[String] = Nil): Either[String, (List[String], String)] = { val trimmed = in.trim - if (trimmed.isEmpty) Right(accum.reverse, "") + if (trimmed.isEmpty) Right((accum.reverse, "")) else argument(trimmed) match { case Right((arg, next)) => (next span Character.isWhitespace) match { diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index c6ea6b23e5..454c9db73c 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -74,7 +74,6 @@ abstract class ClassfileParser { def srcfile = srcfile0 private def optimized = settings.optimise.value - private def currentIsTopLevel = !(currentClass.decodedName containsChar '$') // u1, u2, and u4 are what these data types are called in the JVM spec. // They are an unsigned byte, unsigned char, and unsigned int respectively. @@ -349,7 +348,7 @@ abstract class ClassfileParser { /** Throws an exception signaling a bad tag at given address. */ protected def errorBadTag(start: Int) = - abort("bad constant pool tag ${in.buf(start)} at byte $start") + abort(s"bad constant pool tag ${in.buf(start)} at byte $start") } private def loadClassSymbol(name: Name): Symbol = { diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index c87de8839f..4265efc839 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -815,7 +815,7 @@ trait Implicits { if (search.isDivergent && countdown > 0) { countdown -= 1 implicitSym = i.sym - log("discarding divergent implicit ${implicitSym} during implicit search") + log(s"discarding divergent implicit $implicitSym during implicit search") SearchFailure } else search } diff --git a/src/compiler/scala/tools/util/PathResolver.scala b/src/compiler/scala/tools/util/PathResolver.scala index bdd6a02043..82f2c5dc74 100644 --- a/src/compiler/scala/tools/util/PathResolver.scala +++ b/src/compiler/scala/tools/util/PathResolver.scala @@ -8,8 +8,8 @@ package tools package util import scala.tools.reflect.WrappedProperties.AccessControl -import scala.tools.nsc.{ Settings, GenericRunnerSettings } -import scala.tools.nsc.util.{ ClassPath, JavaClassPath, ScalaClassLoader } +import scala.tools.nsc.{ Settings } +import scala.tools.nsc.util.{ ClassPath, JavaClassPath } import scala.reflect.io.{ File, Directory, Path, AbstractFile } import ClassPath.{ JavaContext, DefaultJavaContext, join, split } import PartialFunction.condOpt diff --git a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala index f260ee4093..3963447de3 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala @@ -396,7 +396,6 @@ abstract class CPSAnnotationChecker extends CPSUtils { * for a tree. All this should do is add annotations. */ override def pluginsTyped(tpe: Type, typer: Typer, tree: Tree, mode: Mode, pt: Type): Type = { - import scala.util.control._ if (!cpsEnabled) { val report = try hasCpsParamTypes(tpe) catch { case _: MissingRequirementError => false } if (report) diff --git a/src/partest/scala/tools/partest/BytecodeTest.scala b/src/partest/scala/tools/partest/BytecodeTest.scala index 172fa29189..2690b784d1 100644 --- a/src/partest/scala/tools/partest/BytecodeTest.scala +++ b/src/partest/scala/tools/partest/BytecodeTest.scala @@ -55,7 +55,7 @@ abstract class BytecodeTest extends ASMConverters { val name2 = clazzB.name if (ms1.length != ms2.length) { - println("Different member counts in $name1 and $name2") + println(s"Different member counts in $name1 and $name2") false } else (ms1, ms2).zipped forall { (m1, m2) => diff --git a/src/partest/scala/tools/partest/TestState.scala b/src/partest/scala/tools/partest/TestState.scala index dbe8a222a5..e58b479e54 100644 --- a/src/partest/scala/tools/partest/TestState.scala +++ b/src/partest/scala/tools/partest/TestState.scala @@ -59,7 +59,6 @@ object TestState { def reason = s"caught $caught_s - ${caught.getMessage}" private def caught_s = (caught.getClass.getName split '.').last - private def stack_s = stackTraceString(caught) override def transcriptString = nljoin(super.transcriptString, caught_s) } } diff --git a/src/partest/scala/tools/partest/nest/Runner.scala b/src/partest/scala/tools/partest/nest/Runner.scala index 1d41095fce..6b09aa4689 100644 --- a/src/partest/scala/tools/partest/nest/Runner.scala +++ b/src/partest/scala/tools/partest/nest/Runner.scala @@ -17,7 +17,6 @@ import scala.reflect.internal.FatalError import scala.sys.process.{ Process, ProcessLogger } import scala.tools.nsc.Properties.{ envOrElse, isWin, jdkHome, javaHome, propOrElse, propOrEmpty, setProp } import scala.tools.nsc.{ Settings, CompilerCommand, Global } -import scala.tools.nsc.io.{ AbstractFile, PlainFile } import scala.tools.nsc.reporters.ConsoleReporter import scala.tools.nsc.util.{ Exceptional, ScalaClassLoader, stackTraceString } import scala.tools.scalap.Main.decompileScala @@ -86,7 +85,7 @@ class Runner(val testFile: File, fileManager: FileManager, val testRunParams: Te type RanOneTest = (Boolean, LogContext) def showCrashInfo(t: Throwable) { - System.err.println("Crashed running test $testIdent: " + t) + System.err.println(s"Crashed running test $testIdent: $t") if (!isPartestTerse) System.err.println(stackTraceString(t)) } @@ -490,13 +489,7 @@ class Runner(val testFile: File, fileManager: FileManager, val testRunParams: Te def fsString = fs map (_.toString stripPrefix parentFile.toString + "/") mkString " " def isOk = result.isOk - def mkScalacString(): String = { - val flags = file2String(flagsFile) match { - case "" => "" - case s => " " + s - } - s"""scalac $fsString""" - } + def mkScalacString(): String = s"""scalac $fsString""" override def toString = description + ( if (result.isOk) "" else "\n" + result.status ) } case class OnlyJava(fs: List[File]) extends CompileRound { @@ -770,7 +763,7 @@ trait DirectRunner { import PartestDefaults.{ numThreads, waitTime } setUncaughtHandler - + def runTestsForFiles(kindFiles: List[File], kind: String): List[TestState] = { NestUI.resetTestNumber(kindFiles.size) @@ -866,7 +859,6 @@ object Output { /** Use a Runner to run a test. */ class RunnerManager(kind: String, fileManager: FileManager, params: TestRunParams) { - import fileManager._ fileManager.CLASSPATH += File.pathSeparator + PathSettings.scalaCheck fileManager.CLASSPATH += File.pathSeparator + PathSettings.diffUtils // needed to put diffutils on test/partest's classpath @@ -878,7 +870,7 @@ class RunnerManager(kind: String, fileManager: FileManager, params: TestRunParam if (fileManager.failed && !runner.logFile.canRead) runner.genPass() else { - val (state, elapsed) = + val (state, _) = try timed(runner.run()) catch { case t: Throwable => throw new RuntimeException(s"Error running $testFile", t) diff --git a/src/reflect/scala/reflect/internal/Kinds.scala b/src/reflect/scala/reflect/internal/Kinds.scala index 315bf7e9c4..d1c215713e 100644 --- a/src/reflect/scala/reflect/internal/Kinds.scala +++ b/src/reflect/scala/reflect/internal/Kinds.scala @@ -380,7 +380,7 @@ trait Kinds { object TypeConKind { def apply(args: Seq[TypeConKind.Argument]): TypeConKind = this(TypeBounds.empty, args) def apply(bounds: TypeBounds, args: Seq[TypeConKind.Argument]): TypeConKind = new TypeConKind(bounds, args) - def unapply(tck: TypeConKind): Some[(TypeBounds, Seq[TypeConKind.Argument])] = Some(tck.bounds, tck.args) + def unapply(tck: TypeConKind): Some[(TypeBounds, Seq[TypeConKind.Argument])] = Some((tck.bounds, tck.args)) case class Argument(variance: Variance, kind: Kind)(val sym: Symbol) {} } diff --git a/src/reflect/scala/reflect/internal/util/WeakHashSet.scala b/src/reflect/scala/reflect/internal/util/WeakHashSet.scala index 9b792a3f43..a8bc79d832 100644 --- a/src/reflect/scala/reflect/internal/util/WeakHashSet.scala +++ b/src/reflect/scala/reflect/internal/util/WeakHashSet.scala @@ -4,7 +4,7 @@ package reflect.internal.util import java.lang.ref.{WeakReference, ReferenceQueue} import scala.annotation.tailrec import scala.collection.generic.Clearable -import scala.collection.mutable.{Set => mSet} +import scala.collection.mutable.{Set => MSet} /** * A HashSet where the elements are stored weakly. Elements in this set are elligible for GC if no other @@ -16,8 +16,8 @@ import scala.collection.mutable.{Set => mSet} * This set implmeentation is not in general thread safe without external concurrency control. However it behaves * properly when GC concurrently collects elements in this set. */ -final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: Double) extends Set[A] with Function1[A, Boolean] with mSet[A] { - +final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: Double) extends Set[A] with Function1[A, Boolean] with MSet[A] { + import WeakHashSet._ def this() = this(initialCapacity = WeakHashSet.defaultInitialCapacity, loadFactor = WeakHashSet.defaultLoadFactor) @@ -47,7 +47,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D candidate *= 2 } candidate - } + } /** * the underlying table of entries which is an array of Entry linked lists @@ -65,7 +65,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D * find the bucket associated with an elements's hash code */ private[this] def bucketFor(hash: Int): Int = { - // spread the bits around to try to avoid accidental collisions using the + // spread the bits around to try to avoid accidental collisions using the // same algorithm as java.util.HashMap var h = hash h ^= h >>> 20 ^ h >>> 12 @@ -98,7 +98,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D def poll(): Entry[A] = queue.poll().asInstanceOf[Entry[A]] @tailrec - def queueLoop { + def queueLoop(): Unit = { val stale = poll() if (stale != null) { val bucket = bucketFor(stale.hash) @@ -109,11 +109,11 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D linkedListLoop(null, table(bucket)) - queueLoop + queueLoop() } } - - queueLoop + + queueLoop() } /** @@ -123,7 +123,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D val oldTable = table table = new Array[Entry[A]](oldTable.size * 2) threshhold = computeThreshHold - + @tailrec def tableLoop(oldBucket: Int): Unit = if (oldBucket < oldTable.size) { @tailrec @@ -225,7 +225,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D def +=(elem: A) = this + elem // from scala.reflect.interanl.Set - override def addEntry(x: A) { this += x } + override def addEntry(x: A) { this += x } // remove an element from this set and return this set override def -(elem: A): this.type = elem match { @@ -274,6 +274,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D override def foreach[U](f: A => U): Unit = iterator foreach f + // It has the `()` because iterator runs `removeStaleEntries()` override def toList(): List[A] = iterator.toList // Iterator over all the elements in this set in no particular order @@ -292,7 +293,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D */ private[this] var entry: Entry[A] = null - /** + /** * the element that will be the result of the next call to next() */ private[this] var lookaheadelement: A = null.asInstanceOf[A] @@ -339,7 +340,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D * the entries must be stable. If any are garbage collected during validation * then an assertion may inappropriately fire. */ - def fullyValidate { + def fullyValidate: Unit = { var computedCount = 0 var bucket = 0 while (bucket < table.size) { @@ -407,10 +408,10 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D e = e.tail } count - } + } } - private[util] def diagnostics = new Diagnostics + private[util] def diagnostics = new Diagnostics } /** diff --git a/src/reflect/scala/reflect/runtime/ReflectSetup.scala b/src/reflect/scala/reflect/runtime/ReflectSetup.scala index 84f159be00..6a364ff0be 100644 --- a/src/reflect/scala/reflect/runtime/ReflectSetup.scala +++ b/src/reflect/scala/reflect/runtime/ReflectSetup.scala @@ -2,7 +2,7 @@ package scala package reflect package runtime -import internal.{SomePhase, NoPhase, Phase, TreeGen} +import internal.{SomePhase, NoPhase, Phase} /** A helper trait to initialize things that need to be set before JavaMirrors and other * reflect specific traits are initialized */ diff --git a/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala b/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala index d407b93a4b..fe5ed47d43 100644 --- a/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala +++ b/src/scaladoc/scala/tools/nsc/doc/ScaladocAnalyzer.scala @@ -7,12 +7,10 @@ package scala.tools.nsc package doc import scala.tools.nsc.ast.parser.{ SyntaxAnalyzer, BracePatch } -import scala.reflect.internal.Chars._ -import symtab._ import typechecker.Analyzer +import scala.reflect.internal.Chars._ import scala.reflect.internal.util.{ BatchSourceFile, RangePosition } import scala.tools.nsc.doc.base.{ CommentFactoryBase, MemberLookupBase, LinkTo, LinkToExternal } -import scala.language.postfixOps trait ScaladocAnalyzer extends Analyzer { val global : Global // generally, a ScaladocGlobal @@ -168,7 +166,7 @@ abstract class ScaladocSyntaxAnalyzer[G <: Global](val global: G) extends Syntax } override def internalLink(sym: Symbol, site: Symbol): Option[LinkTo] = None - override def chooseLink(links: List[LinkTo]): LinkTo = links.headOption orNull + override def chooseLink(links: List[LinkTo]): LinkTo = links.headOption.orNull override def toString(link: LinkTo): String = "No link" override def findExternalLink(sym: Symbol, name: String): Option[LinkToExternal] = None override def warnNoLink: Boolean = false diff --git a/src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala b/src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala index 723f8b1dc8..e654678c6d 100644 --- a/src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala +++ b/src/scaladoc/scala/tools/nsc/doc/ScaladocGlobal.scala @@ -7,7 +7,6 @@ package scala.tools.nsc package doc import scala.tools.nsc.ast.parser.{ SyntaxAnalyzer, BracePatch } -import scala.reflect.internal.Chars._ import symtab._ import reporters.Reporter import typechecker.Analyzer diff --git a/src/scalap/scala/tools/scalap/ByteArrayReader.scala b/src/scalap/scala/tools/scalap/ByteArrayReader.scala index 9c72bdbf1e..cf160871dd 100644 --- a/src/scalap/scala/tools/scalap/ByteArrayReader.scala +++ b/src/scalap/scala/tools/scalap/ByteArrayReader.scala @@ -11,7 +11,6 @@ package tools.scalap class ByteArrayReader(content: Array[Byte]) { - import java.io._ /** the buffer containing the file */ diff --git a/src/scalap/scala/tools/scalap/Main.scala b/src/scalap/scala/tools/scalap/Main.scala index 5da4227e53..c72f416a89 100644 --- a/src/scalap/scala/tools/scalap/Main.scala +++ b/src/scalap/scala/tools/scalap/Main.scala @@ -14,7 +14,7 @@ import scalax.rules.scalasig._ import scala.tools.nsc.util.{ ClassPath, JavaClassPath } import scala.tools.util.PathResolver import ClassPath.DefaultJavaContext -import scala.tools.nsc.io.{ PlainFile, AbstractFile } +import scala.tools.nsc.io.AbstractFile /**The main object used to execute scalap on the command-line. * diff --git a/src/scalap/scala/tools/scalap/MetaParser.scala b/src/scalap/scala/tools/scalap/MetaParser.scala index 8b4ffb3efd..1ebf86268a 100644 --- a/src/scalap/scala/tools/scalap/MetaParser.scala +++ b/src/scalap/scala/tools/scalap/MetaParser.scala @@ -9,7 +9,6 @@ package scala package tools.scalap -import java.io._ import java.util._ |