diff options
author | michelou <michelou@epfl.ch> | 2009-09-25 19:56:41 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2009-09-25 19:56:41 +0000 |
commit | 15eb9333fa7fddc458f1c79da8ff1270ce990db2 (patch) | |
tree | 5898043971c2581f95889e92035a39fd3b16173a /src/compiler | |
parent | 0c50ba867782ce737b99f1f108103b7ba53a1a50 (diff) | |
download | scala-15eb9333fa7fddc458f1c79da8ff1270ce990db2.tar.gz scala-15eb9333fa7fddc458f1c79da8ff1270ce990db2.tar.bz2 scala-15eb9333fa7fddc458f1c79da8ff1270ce990db2.zip |
reverted 'doArg' change made in r18738, removed...
reverted 'doArg' change made in r18738, removed a few warnings
Diffstat (limited to 'src/compiler')
4 files changed, 21 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala index 4a5afb7baf..a7be8ae13e 100644 --- a/src/compiler/scala/tools/nsc/Settings.scala +++ b/src/compiler/scala/tools/nsc/Settings.scala @@ -139,7 +139,7 @@ class Settings(errorFn: String => Unit) extends ScalacSettings { val arg :: rest = args if (arg == "") { // it looks like Ant passes "" sometimes - doArgs(rest) + rest } else if (!arg.startsWith("-")) { errorFn("Argument '" + arg + "' does not start with '-'.") @@ -158,11 +158,11 @@ class Settings(errorFn: String => Unit) extends ScalacSettings { // Internally we use Option[List[String]] to discover error, // but the outside expects our arguments back unchanged on failure if (arg contains ":") parseColonArg(arg) match { - case Some(_) => doArgs(rest) + case Some(_) => rest case None => args } else if (isPropertyArg(arg)) parsePropertyArg(arg) match { - case Some(_) => doArgs(rest) + case Some(_) => rest case None => args } else parseNormalArg(arg, rest) match { diff --git a/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala b/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala index c07cb62277..cce0dc7634 100644 --- a/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala +++ b/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala @@ -1,3 +1,9 @@ +/* NSC -- new Scala compiler + * Copyright 2005-2009 LAMP/EPFL + * @author Martin Odersky + */ +// $Id$ + package scala.tools.nsc package interactive @@ -87,7 +93,7 @@ class RefinedBuildManager(val settings: Settings) extends Changes with BuildMana val changesOf = new mutable.HashMap[Symbol, List[Change]] val defs = compiler.dependencyAnalysis.definitions - for (val src <- files; val syms = defs(src); val sym <- syms) { + for (src <- files; val syms = defs(src); sym <- syms) { definitions(src).find(_.fullNameString == sym.fullNameString) match { case Some(oldSym) => changesOf(oldSym) = changeSet(oldSym, sym) diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala index d36ca29afa..05ee731ca1 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala @@ -146,7 +146,7 @@ abstract class Pickler extends SubComponent { localChildDummy.setInfo(ClassInfoType(List(sym.tpe), EmptyScope, localChildDummy)) localChildDummy :: globals } - putChildren(sym, children.sort((x, y) => x isLess y)) + putChildren(sym, children.sortWith((x, y) => x isLess y)) } for (annot <- staticAnnotations(sym.annotations.reverse)) putAnnotation(sym, annot) diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala index 03526665dd..2ee768b592 100644 --- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala +++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala @@ -1,3 +1,9 @@ +/* NSC -- new Scala compiler + * Copyright 2005-2009 LAMP/EPFL + * @author Iulian Dragos + */ +// $Id$ + package scala.tools.nsc package transform @@ -190,8 +196,8 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { val tvars = if (sym.isClass) env.keySet else specializedTypeVars(sym.info).intersect(env.keySet) val (methparams, others) = tvars.toList.partition(_.owner.isMethod) - val tvars1 = methparams.sort(_.name.toString < _.name.toString) - val tvars2 = others.sort(_.name.toString < _.name.toString) + val tvars1 = methparams.sortWith(_.name.toString < _.name.toString) + val tvars2 = others.sortWith(_.name.toString < _.name.toString) log("specName(" + sym + ") env " + env) specializedName(sym.name, tvars1 map env, tvars2 map env) } @@ -1036,8 +1042,8 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { // replace value and type paremeters of the old method with the new ones val symSubstituter = new ImplementationAdapter( - List.flatten(parameters(target)) ::: origtparams, - List.flatten(vparamss1).map(_.symbol) ::: newtparams) + parameters(target).flatten ::: origtparams, + vparamss1.flatten.map(_.symbol) ::: newtparams) val adapter = new AdaptSpecializedValues val tmp = symSubstituter(adapter(body(target).duplicate)) tpt.tpe = tpt.tpe.substSym(oldtparams, newtparams) |