diff options
Diffstat (limited to 'src')
57 files changed, 126 insertions, 107 deletions
diff --git a/src/actors/scala/actors/ActorTask.scala b/src/actors/scala/actors/ActorTask.scala index 8d0379c095..090d0448f0 100644 --- a/src/actors/scala/actors/ActorTask.scala +++ b/src/actors/scala/actors/ActorTask.scala @@ -12,12 +12,16 @@ package scala.actors /** * @author Philipp Haller + * @note This class inherits a public var called 'msg' from ReactorTask, + * and also defines a constructor parameter which shadows it (which makes any + * changes to the underlying var invisible.) I can't figure out what's supposed + * to happen, so I renamed the constructor parameter to at least be less confusing. */ private[actors] class ActorTask(actor: Actor, fun: () => Unit, handler: PartialFunction[Any, Any], - msg: Any) - extends ReplyReactorTask(actor, fun, handler, msg) { + initialMsg: Any) + extends ReplyReactorTask(actor, fun, handler, initialMsg) { protected override def beginExecution() { super.beginExecution() @@ -31,8 +35,11 @@ private[actors] class ActorTask(actor: Actor, val senderInfo = try { Some(actor.sender) } catch { case _: Exception => None } + // !!! If this is supposed to be setting the current contents of the + // inherited mutable var rather than always the value given in the constructor, + // then it should be changed from initialMsg to msg. val uncaught = UncaughtException(actor, - if (msg != null) Some(msg) else None, + if (initialMsg != null) Some(initialMsg) else None, senderInfo, Thread.currentThread, e) diff --git a/src/actors/scala/actors/ReplyReactorTask.scala b/src/actors/scala/actors/ReplyReactorTask.scala index 1db722f89b..cb63d7e000 100644 --- a/src/actors/scala/actors/ReplyReactorTask.scala +++ b/src/actors/scala/actors/ReplyReactorTask.scala @@ -12,18 +12,25 @@ package scala.actors /** * @author Philipp Haller + * @note This class inherits a public var called 'reactor' from ReactorTask, + * and also defines a constructor parameter which shadows it (which makes any + * changes to the underlying var invisible.) I can't figure out what's supposed + * to happen, so I renamed the constructor parameter to at least be less confusing. */ -private[actors] class ReplyReactorTask(reactor: ReplyReactor, +private[actors] class ReplyReactorTask(replyReactor: ReplyReactor, fun: () => Unit, handler: PartialFunction[Any, Any], msg: Any) - extends ReactorTask(reactor, fun, handler, msg) { + extends ReactorTask(replyReactor, fun, handler, msg) { var saved: ReplyReactor = _ protected override def beginExecution() { saved = Actor.tl.get - Actor.tl set reactor + // !!! If this is supposed to be setting the current contents of the + // inherited mutable var rather than always the value given in the constructor, + // then it should be changed to "set reactor". + Actor.tl set replyReactor } protected override def suspendExecution() { diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala index 265261f594..d17747e22a 100644 --- a/src/compiler/scala/reflect/internal/Types.scala +++ b/src/compiler/scala/reflect/internal/Types.scala @@ -649,7 +649,11 @@ trait Types extends api.Types { self: SymbolTable => } /** Returns all parts of this type which satisfy predicate `p` */ - def filter(p: Type => Boolean): List[Type] = new FilterTypeCollector(p).collect(this).toList + def filter(p: Type => Boolean): List[Type] = new FilterTypeCollector(p) collect this + def withFilter(p: Type => Boolean) = new FilterTypeCollector(p) { + def foreach[U](f: Type => U): Unit = collect(Type.this) foreach f + def map[T](f: Type => T): List[T] = collect(Type.this) map f + } /** Returns optionally first type (in a preorder traversal) which satisfies predicate `p`, * or None if none exists. @@ -4094,9 +4098,13 @@ A type's typeSymbol should never be inspected directly. } /** A map to implement the `filter` method. */ - class FilterTypeCollector(p: Type => Boolean) extends TypeCollector(new ListBuffer[Type]) { + class FilterTypeCollector(p: Type => Boolean) extends TypeCollector[List[Type]](Nil) { + def withFilter(q: Type => Boolean) = new FilterTypeCollector(tp => p(tp) && q(tp)) + + override def collect(tp: Type) = super.collect(tp).reverse + def traverse(tp: Type) { - if (p(tp)) result += tp + if (p(tp)) result ::= tp mapOver(tp) } } diff --git a/src/compiler/scala/reflect/internal/pickling/UnPickler.scala b/src/compiler/scala/reflect/internal/pickling/UnPickler.scala index 00dc04de80..1a8540c158 100644 --- a/src/compiler/scala/reflect/internal/pickling/UnPickler.scala +++ b/src/compiler/scala/reflect/internal/pickling/UnPickler.scala @@ -46,7 +46,7 @@ abstract class UnPickler /*extends reflect.generic.UnPickler*/ { } } - class Scan(bytes: Array[Byte], offset: Int, classRoot: Symbol, moduleRoot: Symbol, filename: String) extends PickleBuffer(bytes, offset, -1) { + class Scan(_bytes: Array[Byte], offset: Int, classRoot: Symbol, moduleRoot: Symbol, filename: String) extends PickleBuffer(_bytes, offset, -1) { //println("unpickle " + classRoot + " and " + moduleRoot)//debug protected def debug = settings.debug.value @@ -509,7 +509,7 @@ abstract class UnPickler /*extends reflect.generic.UnPickler*/ { val tpe = if (tag == EMPTYtree) NoType else readTypeRef() // Set by the three functions to follow. If symbol is non-null - // after the the new tree 't' has been created, t has its Symbol + // after the new tree 't' has been created, t has its Symbol // set to symbol; and it always has its Type set to tpe. var symbol: Symbol = null var mods: Modifiers = null diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala index f65481e29a..13f608ed4e 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala @@ -310,7 +310,7 @@ abstract class TreeBuilder { * for (P <- G) E ==> G.foreach (P => E) * * Here and in the following (P => E) is interpreted as the function (P => E) - * if P is a a variable pattern and as the partial function { case P => E } otherwise. + * if P is a variable pattern and as the partial function { case P => E } otherwise. * * 2. * diff --git a/src/compiler/scala/tools/nsc/backend/icode/Linearizers.scala b/src/compiler/scala/tools/nsc/backend/icode/Linearizers.scala index 8130c99978..1978a23d90 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/Linearizers.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/Linearizers.scala @@ -284,7 +284,7 @@ trait Linearizers { handler.startBlock +=: lb } - // The first block emitted after a try-catch must be the the one that the try / catch + // The first block emitted after a try-catch must be the one that the try / catch // blocks jump to (because in msil, these jumps cannot be emitted manually) var firstAfter: Option[BasicBlock] = None diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 78fab859a3..e80927f620 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -486,7 +486,7 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with // push the class jcode emitPUSH javaType(c.symbol).asInstanceOf[JReferenceType] - // push the the string array of field information + // push the string array of field information jcode emitPUSH fieldList.length jcode emitANEWARRAY strKind push(fieldList) diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala index 813958af85..5e5320ca9a 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Template.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Template.scala @@ -563,8 +563,7 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { if (!nameLink.isEmpty) <a href={nameLink}>{nameHtml}</a> else nameHtml - } - { + }{ def tparamsToHtml(mbr: Entity): NodeSeq = mbr match { case hk: HigherKinded => val tpss = hk.typeParams @@ -580,8 +579,8 @@ class Template(tpl: DocTemplateEntity) extends HtmlPage { case _ => NodeSeq.Empty } tparamsToHtml(mbr) - } - { if (isReduced) NodeSeq.Empty else { + }{ + if (isReduced) NodeSeq.Empty else { def paramsToHtml(vlsss: List[List[ValueParam]]): NodeSeq = { def param0(vl: ValueParam): NodeSeq = // notice the }{ in the next lines, they are necessary to avoid a undesired withspace in output diff --git a/src/compiler/scala/tools/nsc/doc/model/Entity.scala b/src/compiler/scala/tools/nsc/doc/model/Entity.scala index 266b9294dd..6eb14a4907 100644 --- a/src/compiler/scala/tools/nsc/doc/model/Entity.scala +++ b/src/compiler/scala/tools/nsc/doc/model/Entity.scala @@ -376,7 +376,7 @@ trait ParameterEntity extends Entity { /** A type parameter to a class, trait, or method. */ trait TypeParam extends ParameterEntity with HigherKinded { - /** The variance of this type type parameter. Valid values are "+", "-", and the empty string. */ + /** The variance of this type parameter. Valid values are "+", "-", and the empty string. */ def variance: String /** The lower bound for this type parameter, if it has been defined. */ diff --git a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala index c2e27cd205..f2d59206e0 100644 --- a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala +++ b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala @@ -128,7 +128,7 @@ trait CompilerControl { self: Global => } /** Sets sync var `response` to the smallest fully attributed tree that encloses position `pos`. - * Note: Unlike for most other ask... operations, the source file belonging to `pos` needs not be be loaded. + * Note: Unlike for most other ask... operations, the source file belonging to `pos` needs not be loaded. */ def askTypeAt(pos: Position, response: Response[Tree]) = postWorkItem(new AskTypeAtItem(pos, response)) diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 7fea76c7b1..f900859f46 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -22,8 +22,8 @@ import symtab.Flags.{ACCESSOR, PARAMACCESSOR} /** The main class of the presentation compiler in an interactive environment such as an IDE */ -class Global(settings: Settings, reporter: Reporter, projectName: String = "") - extends scala.tools.nsc.Global(settings, reporter) +class Global(settings: Settings, _reporter: Reporter, projectName: String = "") + extends scala.tools.nsc.Global(settings, _reporter) with CompilerControl with RangePositions with ContextTrees diff --git a/src/compiler/scala/tools/nsc/io/Lexer.scala b/src/compiler/scala/tools/nsc/io/Lexer.scala index 8f103f9b98..5ffb5b4d4f 100644 --- a/src/compiler/scala/tools/nsc/io/Lexer.scala +++ b/src/compiler/scala/tools/nsc/io/Lexer.scala @@ -281,7 +281,7 @@ class Lexer(rd: Reader) { /** The current token is a delimiter consisting of given character, reads next token, * otherwise raises an error. * @param c the given delimiter character to compare current token with - * @throws MalformedInput if the the current token `token` is not a delimiter, or + * @throws MalformedInput if the current token `token` is not a delimiter, or * consists of a character different from `c`. */ def accept(ch: Char) { diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala index d001a0af8b..98345dd01e 100644 --- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala +++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala @@ -297,7 +297,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL { case nme.toDouble => "toDouble" case _ => return None } - Some(newName, runtimeTest) + Some((newName, runtimeTest)) } def infixTest(name: Name): Option[(String, Tree => Tree)] = { val (newName, runtimeTest) = name match { @@ -322,7 +322,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL { case nme.ZAND => ("takeConditionalAnd", testForBoolean) case _ => return None } - Some(newName, runtimeTest) + Some((newName, runtimeTest)) } /** The Tree => Tree function in the return is necessary to prevent the original qual diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index 9806857ff2..1a421eb82f 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -421,7 +421,7 @@ abstract class Erasure extends AddInterfaces */ /** The modifier typer which retypes with erased types. */ - class Eraser(context: Context) extends Typer(context) { + class Eraser(_context: Context) extends Typer(_context) { private def safeToRemoveUnbox(cls: Symbol): Boolean = (cls == definitions.NullClass) || isBoxedValueClass(cls) diff --git a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala index 031be21f24..2bed5bffd4 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala @@ -69,7 +69,7 @@ abstract class Duplicators extends Analyzer { * tree, except for TypeTrees, are erased prior to type checking. TypeTrees * are fixed by substituting invalid symbols for the new ones. */ - class BodyDuplicator(context: Context) extends Typer(context: Context) { + class BodyDuplicator(_context: Context) extends Typer(_context) { class FixInvalidSyms extends TypeMap { diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 79db9ab000..5b38ddd092 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -1311,7 +1311,11 @@ trait Infer { case TypeRef(_, sym, _) if isLocalBinding(sym) => ; case _ => - patternWarning(arg, "non variable type-argument ") + // Want to warn about type arguments, not type parameters. Otherwise we'll + // see warnings about "invisible" types, like: val List(x0) = x1 leading to "non + // variable type-argument A in type pattern List[A]..." + if (!arg.typeSymbol.isTypeParameterOrSkolem) + patternWarning(arg, "non variable type-argument ") } } } diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 0f57285480..364e887939 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -422,7 +422,7 @@ trait Namers extends MethodSynthesis { * @return the companion object symbol. */ def ensureCompanionObject(cdef: ClassDef, creator: ClassDef => Tree = companionModuleDef(_)): Symbol = { - val m = companionModuleOf(cdef.symbol, context) + val m = companionSymbolOf(cdef.symbol, context) // @luc: not sure why "currentRun.compiles(m)" is needed, things breaks // otherwise. documentation welcome. // @@ -855,7 +855,7 @@ trait Namers extends MethodSynthesis { // @check: this seems to work only if the type completer of the class runs before the one of the // module class: the one from the module class removes the entry from classOfModuleClass (see above). if (clazz.isClass && !clazz.hasModuleFlag) { - val modClass = companionModuleOf(clazz, context).moduleClass + val modClass = companionSymbolOf(clazz, context).moduleClass Namers.this.classOfModuleClass get modClass map { cdefRef => val cdef = cdefRef() @@ -1082,7 +1082,7 @@ trait Namers extends MethodSynthesis { val parentNamer = if (isConstr) { val (cdef, nmr) = moduleNamer.getOrElse { - val module = companionModuleOf(clazz, context) + val module = companionSymbolOf(clazz, context) module.initialize // call type completer (typedTemplate), adds the // module's templateNamer to classAndNamerOfModule classAndNamerOfModule get module match { diff --git a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala index cc88f471ab..8611fafe52 100644 --- a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala +++ b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala @@ -189,7 +189,7 @@ trait NamesDefaults { self: Analyzer => if (pre == NoType) { None } else { - val module = companionModuleOf(baseFun.symbol.owner, context) + val module = companionSymbolOf(baseFun.symbol.owner, context) if (module == NoSymbol) None else { val ref = atPos(pos.focus)(gen.mkAttributedRef(pre, module)) @@ -227,7 +227,7 @@ trait NamesDefaults { self: Analyzer => // super constructor calls case Select(sp @ Super(_, _), _) if isConstr => // 'moduleQual' fixes #3207. selection of the companion module of the - // superclass needs to have the same prefix as the the superclass. + // superclass needs to have the same prefix as the superclass. blockWithoutQualifier(moduleQual(baseFun.pos, sp.symbol.tpe.parents.head)) // self constructor calls (in secondary constructors) @@ -414,7 +414,7 @@ trait NamesDefaults { self: Analyzer => if (i > 0) { val defGetterName = nme.defaultGetterName(param.owner.name, i) if (param.owner.isConstructor) { - val mod = companionModuleOf(param.owner.owner, context) + val mod = companionSymbolOf(param.owner.owner, context) mod.info.member(defGetterName) } else { diff --git a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala index 3c72dc8413..c9991614e4 100644 --- a/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala +++ b/src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala @@ -284,7 +284,7 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT } /** Add a protected accessor, if needed, and return a tree that calls - * the accessor and returns the the same member. The result is already + * the accessor and returns the same member. The result is already * typed. */ private def makeAccessor(tree: Select, targs: List[Tree]): Tree = { diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 7671ccbed7..9b03d59216 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1361,7 +1361,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { "you want, you must write the annotation class in Java.") if (!isPastTyper) { for (ann <- clazz.getAnnotation(DeprecatedAttr)) { - val m = companionModuleOf(clazz, context) + val m = companionSymbolOf(clazz, context) if (m != NoSymbol) m.moduleClass.addAnnotation(AnnotationInfo(ann.atp, ann.args, List())) } @@ -1377,7 +1377,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { def typedModuleDef(mdef: ModuleDef): Tree = { // initialize all constructors of the linked class: the type completer (Namer.methodSig) // might add default getters to this object. example: "object T; class T(x: Int = 1)" - val linkedClass = companionClassOf(mdef.symbol, context) + val linkedClass = companionSymbolOf(mdef.symbol, context) if (linkedClass != NoSymbol) linkedClass.info.decl(nme.CONSTRUCTOR).alternatives foreach (_.initialize) @@ -2223,7 +2223,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { (methCtx != NoContext) && { val contextFun = methCtx.tree.symbol contextFun.isPrimaryConstructor && contextFun.owner.isModuleClass && - companionModuleOf(calledFun.owner, context).moduleClass == contextFun.owner + companionSymbolOf(calledFun.owner, context).moduleClass == contextFun.owner } } } diff --git a/src/compiler/scala/tools/util/EditDistance.scala b/src/compiler/scala/tools/util/EditDistance.scala index a8d7408532..b705a1eac4 100644 --- a/src/compiler/scala/tools/util/EditDistance.scala +++ b/src/compiler/scala/tools/util/EditDistance.scala @@ -33,7 +33,7 @@ object EditDistance { 0 to n foreach (x => d(x)(0) = x) 0 to m foreach (x => d(0)(x) = x) - for (i <- 1 to n ; val s_i = s(i - 1) ; j <- 1 to m) { + for (i <- 1 to n ; s_i = s(i - 1) ; j <- 1 to m) { val t_j = t(j - 1) val cost = if (s_i == t_j) 0 else 1 diff --git a/src/library/scala/Array.scala b/src/library/scala/Array.scala index ae0dd68dfd..99c54ce58c 100644 --- a/src/library/scala/Array.scala +++ b/src/library/scala/Array.scala @@ -24,7 +24,7 @@ class FallbackArrayBuilding { * Called instead of `Array.newBuilder` if the element type of an array * does not have a class manifest. Note that fallbackBuilder factory * needs an implicit parameter (otherwise it would not be dominated in - * implicit search by `Array.canBuildFrom`). We make sure that that + * implicit search by `Array.canBuildFrom`). We make sure that * implicit search is always successful. */ implicit def fallbackCanBuildFrom[T](implicit m: DummyImplicit): CanBuildFrom[Array[_], T, ArraySeq[T]] = @@ -465,7 +465,7 @@ object Array extends FallbackArrayBuilding { * * @author Martin Odersky * @version 1.0 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_38.html "The Scala 2.8 Collections API"]] + * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_38.html#anchor "The Scala 2.8 Collections' API"]] * section on `Array` by Martin Odersky for more information. */ final class Array[T](_length: Int) extends java.io.Serializable with java.lang.Cloneable { diff --git a/src/library/scala/Enumeration.scala b/src/library/scala/Enumeration.scala index c967a48abc..3d85f2f52f 100644 --- a/src/library/scala/Enumeration.scala +++ b/src/library/scala/Enumeration.scala @@ -48,19 +48,20 @@ import java.util.regex.Pattern * * @param initial The initial value from which to count the integers that * identifies values at run-time. - * @param names The sequence of names to give to this enumeration's values. - * * @author Matthias Zenger */ @SerialVersionUID(8476000850333817230L) -abstract class Enumeration(initial: Int, - @deprecated("Names should be specified individually or discovered via reflection", "2.10") - names: String*) extends Serializable { +abstract class Enumeration (initial: Int) extends Serializable { thisenum => def this() = this(0) - - @deprecated("Names should be specified individually or discovered via reflection", "2.10") + + @deprecated("Names should be specified individually or discovered via reflection", "2.10.0") + def this(initial: Int, names: String*) = { + this(initial) + this.nextName = names.iterator + } + @deprecated("Names should be specified individually or discovered via reflection", "2.10.0") def this(names: String*) = this(0, names: _*) /* Note that `readResolve` cannot be private, since otherwise @@ -97,12 +98,13 @@ abstract class Enumeration(initial: Int, } /** The integer to use to identify the next created value. */ - protected var nextId = initial + protected var nextId: Int = initial /** The string to use to name the next created value. */ - protected var nextName = names.iterator + protected var nextName: Iterator[String] = _ + private def nextNameOrNull = - if (nextName.hasNext) nextName.next else null + if (nextName != null && nextName.hasNext) nextName.next else null /** The highest integer amongst those used to identify values in this * enumeration. */ @@ -120,17 +122,8 @@ abstract class Enumeration(initial: Int, */ final def apply(x: Int): Value = vmap(x) - /** - * Return a `Value` from this `Enumeration` whose name matches - * the argument `s`. - * - * You can pass a String* set of names to the constructor, or initialize - * each `Enumeration` with `Value(String)`. Otherwise, the names are - * determined automatically through reflection. - * - * Note the change here wrt 2.7 is intentional. You should know whether - * a name is in an `Enumeration` beforehand. If not, just use find on - * values. + /** Return a `Value` from this `Enumeration` whose name matches + * the argument `s`. The names are determined automatically via reflection. * * @param s an `Enumeration` name * @return the `Value` of this `Enumeration` if its name matches `s` diff --git a/src/library/scala/Option.scala b/src/library/scala/Option.scala index c1b64808b0..bd498de847 100644 --- a/src/library/scala/Option.scala +++ b/src/library/scala/Option.scala @@ -162,6 +162,11 @@ sealed abstract class Option[+A] extends Product with Serializable { @inline final def filterNot(p: A => Boolean): Option[A] = if (isEmpty || !p(this.get)) this else None + /** Returns false if the option is $none, true otherwise. + * @note Implemented here to avoid the implicit conversion to Iterable. + */ + final def nonEmpty = isDefined + /** Necessary to keep $option from being implicitly converted to * [[scala.collection.Iterable]] in `for` comprehensions. */ diff --git a/src/library/scala/collection/SeqLike.scala b/src/library/scala/collection/SeqLike.scala index 8a4f2ff31a..b6b4bfb96d 100644 --- a/src/library/scala/collection/SeqLike.scala +++ b/src/library/scala/collection/SeqLike.scala @@ -21,7 +21,7 @@ import scala.math.Ordering * @define seqInfo * Sequences are special cases of iterable collections of class `Iterable`. * Unlike iterables, sequences always have a defined order of elements. - * Sequences provide a method `apply` for indexing. Indices range from `0` up the the `length` of + * Sequences provide a method `apply` for indexing. Indices range from `0` up to the `length` of * a sequence. Sequences support a number to find occurrences of elements or subsequences, including * `segmentLength`, `prefixLength`, `indexWhere`, `indexOf`, `lastIndexWhere`, `lastIndexOf`, * `startsWith`, `endsWith`, `indexOfSlice`. diff --git a/src/library/scala/collection/immutable/BitSet.scala b/src/library/scala/collection/immutable/BitSet.scala index 4e2f5e45b5..abccd91f9c 100644 --- a/src/library/scala/collection/immutable/BitSet.scala +++ b/src/library/scala/collection/immutable/BitSet.scala @@ -17,7 +17,7 @@ import mutable.{ Builder, SetBuilder } /** A class for immutable bitsets. * $bitsetinfo - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_21.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#immutable_bitsets "Scala's Collection Library overview"]] * section on `Immutable BitSets` for more information. * * @define Coll immutable.BitSet diff --git a/src/library/scala/collection/immutable/HashMap.scala b/src/library/scala/collection/immutable/HashMap.scala index 358a085e86..55ce8fa822 100644 --- a/src/library/scala/collection/immutable/HashMap.scala +++ b/src/library/scala/collection/immutable/HashMap.scala @@ -25,7 +25,7 @@ import parallel.immutable.ParHashMap * @author Tiark Rompf * @version 2.8 * @since 2.3 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_19.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#hash_tries "Scala's Collection Library overview"]] * section on `Hash Tries` for more information. * @define Coll immutable.HashMap * @define coll immutable hash map diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala index b6714f9dde..531eac6c01 100644 --- a/src/library/scala/collection/immutable/List.scala +++ b/src/library/scala/collection/immutable/List.scala @@ -57,13 +57,9 @@ import annotation.tailrec * @author Martin Odersky and others * @version 2.8 * @since 1.0 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_13.html "The Scala 2..8 Collections API"]] + * @see [["http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#lists" "Scala's Collection Library overview"]] * section on `Lists` for more information. - - * - * @tparam A the type of the list's elements * - * @define Coll List * @define coll list * @define thatinfo the class of the returned collection. In the standard library configuration, * `That` is always `List[B]` because an implicit of type `CanBuildFrom[List, B, That]` diff --git a/src/library/scala/collection/immutable/ListMap.scala b/src/library/scala/collection/immutable/ListMap.scala index 2231da510a..e008fb86e3 100644 --- a/src/library/scala/collection/immutable/ListMap.scala +++ b/src/library/scala/collection/immutable/ListMap.scala @@ -16,7 +16,7 @@ import annotation.{tailrec, bridge} /** $factoryInfo * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_22.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#list_maps "Scala's Collection Library overview"]] * section on `List Maps` for more information. * * @define Coll immutable.ListMap diff --git a/src/library/scala/collection/immutable/Queue.scala b/src/library/scala/collection/immutable/Queue.scala index 53ed227e51..da04446281 100644 --- a/src/library/scala/collection/immutable/Queue.scala +++ b/src/library/scala/collection/immutable/Queue.scala @@ -27,8 +27,8 @@ import annotation.tailrec * @author Erik Stenman * @version 1.0, 08/07/2003 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_17.html "The Scala 2.8 Collections API"]] - * section on `Ummutable Queues` for more information. + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#immutable_queues "Scala's Collection Library overview"]] + * section on `Immutable Queues` for more information. * * @define Coll immutable.Queue * @define coll immutable queue diff --git a/src/library/scala/collection/immutable/Range.scala b/src/library/scala/collection/immutable/Range.scala index f089298350..e891f8bec8 100644 --- a/src/library/scala/collection/immutable/Range.scala +++ b/src/library/scala/collection/immutable/Range.scala @@ -31,7 +31,7 @@ import annotation.bridge * @author Paul Phillips * @version 2.8 * @since 2.5 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_18.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#ranges "Scala's Collection Library overview"]] * section on `Ranges` for more information. * * @define Coll Range diff --git a/src/library/scala/collection/immutable/Stack.scala b/src/library/scala/collection/immutable/Stack.scala index 4de0f9e8f4..50fc2795c0 100644 --- a/src/library/scala/collection/immutable/Stack.scala +++ b/src/library/scala/collection/immutable/Stack.scala @@ -34,7 +34,7 @@ object Stack extends SeqFactory[Stack] { * @author Matthias Zenger * @version 1.0, 10/07/2003 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_16.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#immutable_stacks "Scala's Collection Library overview"]] * section on `Immutable stacks` for more information. * * @define Coll immutable.Stack diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index cb387c6316..e6587f9615 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -172,8 +172,8 @@ import Stream.cons * @author Martin Odersky, Matthias Zenger * @version 1.1 08/08/03 * @since 2.8 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_14.html "The Scala 2.8 Collections API"]] - * section on `Streams` for more information. + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#streams "Scala's Collection Library overview"]] + * section on `Streams` for more information. * @define naturalsEx def naturalsFrom(i: Int): Stream[Int] = i #:: naturalsFrom(i + 1) * @define Coll Stream diff --git a/src/library/scala/collection/immutable/TreeMap.scala b/src/library/scala/collection/immutable/TreeMap.scala index 66f8763a8d..ef0eac3701 100644 --- a/src/library/scala/collection/immutable/TreeMap.scala +++ b/src/library/scala/collection/immutable/TreeMap.scala @@ -36,7 +36,7 @@ object TreeMap extends ImmutableSortedMapFactory[TreeMap] { * @author Matthias Zenger * @version 1.1, 03/05/2004 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_20.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#redblack_trees "Scala's Collection Library overview"]] * section on `Red-Black Trees` for more information. * * @define Coll immutable.TreeMap diff --git a/src/library/scala/collection/immutable/TreeSet.scala b/src/library/scala/collection/immutable/TreeSet.scala index 966e03b984..8b90ece143 100644 --- a/src/library/scala/collection/immutable/TreeSet.scala +++ b/src/library/scala/collection/immutable/TreeSet.scala @@ -36,7 +36,7 @@ object TreeSet extends ImmutableSortedSetFactory[TreeSet] { * @author Martin Odersky * @version 2.0, 02/01/2007 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_20.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#redblack_trees "Scala's Collection Library overview"]] * section on `Red-Black Trees` for more information. * * @define Coll immutable.TreeSet diff --git a/src/library/scala/collection/immutable/Vector.scala b/src/library/scala/collection/immutable/Vector.scala index 03cd98d20e..55c31feec2 100644 --- a/src/library/scala/collection/immutable/Vector.scala +++ b/src/library/scala/collection/immutable/Vector.scala @@ -35,7 +35,7 @@ object Vector extends SeqFactory[Vector] { * endian bit-mapped vector trie with a branching factor of 32. Locality is very good, but not * contiguous, which is good for very large sequences. * - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_15.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-immutable-collection-classes.html#vectors "Scala's Collection Library overview"]] * section on `Vectors` for more information. * * @tparam A the element type diff --git a/src/library/scala/collection/mutable/ArrayBuffer.scala b/src/library/scala/collection/mutable/ArrayBuffer.scala index 503ada0153..bfdc08536c 100644 --- a/src/library/scala/collection/mutable/ArrayBuffer.scala +++ b/src/library/scala/collection/mutable/ArrayBuffer.scala @@ -23,8 +23,8 @@ import parallel.mutable.ParArray * @author Martin Odersky * @version 2.8 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_38.html "The Scala 2.8 Collections API"]] - * section on `Concrete Mutable Collection Classes` for more information. + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#array_buffers "Scala's Collection Library overview"]] + * section on `Array Buffers` for more information. * * @tparam A the type of this arraybuffer's elements. diff --git a/src/library/scala/collection/mutable/ArraySeq.scala b/src/library/scala/collection/mutable/ArraySeq.scala index 3f7066b40f..cb86c416fe 100644 --- a/src/library/scala/collection/mutable/ArraySeq.scala +++ b/src/library/scala/collection/mutable/ArraySeq.scala @@ -21,7 +21,7 @@ import parallel.mutable.ParArray * @author Martin Odersky * @version 2.8 * @since 2.8 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_31.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#array_sequences "Scala's Collection Library overview"]] * section on `Array Sequences` for more information. * * @tparam A type of the elements contained in this array sequence. diff --git a/src/library/scala/collection/mutable/ArrayStack.scala b/src/library/scala/collection/mutable/ArrayStack.scala index faa22b948e..f5287312b9 100644 --- a/src/library/scala/collection/mutable/ArrayStack.scala +++ b/src/library/scala/collection/mutable/ArrayStack.scala @@ -46,7 +46,7 @@ object ArrayStack extends SeqFactory[ArrayStack] { * * @author David MacIver * @since 2.7 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_33.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#array_stacks "Scala's Collection Library overview"]] * section on `Array Stacks` for more information. * * @tparam T type of the elements contained in this array stack. diff --git a/src/library/scala/collection/mutable/BitSet.scala b/src/library/scala/collection/mutable/BitSet.scala index 03228f91b1..6b9673dae6 100644 --- a/src/library/scala/collection/mutable/BitSet.scala +++ b/src/library/scala/collection/mutable/BitSet.scala @@ -18,7 +18,7 @@ import BitSetLike.{LogWL, updateArray} * * $bitsetinfo * - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_37.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#mutable_bitsets "Scala's Collection Library overview"]] * section on `Mutable Bitsets` for more information. * * @define Coll BitSet diff --git a/src/library/scala/collection/mutable/ConcurrentMap.scala b/src/library/scala/collection/mutable/ConcurrentMap.scala index be7718591b..fbb356ffb3 100644 --- a/src/library/scala/collection/mutable/ConcurrentMap.scala +++ b/src/library/scala/collection/mutable/ConcurrentMap.scala @@ -14,7 +14,7 @@ package mutable * $concurrentmapinfo * * @since 2.8 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_36.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#concurrent_maps "Scala's Collection Library overview"]] * section on `Concurrent Maps` for more information. * * @tparam A the key type of the map diff --git a/src/library/scala/collection/mutable/DoubleLinkedList.scala b/src/library/scala/collection/mutable/DoubleLinkedList.scala index 0934cfa081..49378a4f4e 100644 --- a/src/library/scala/collection/mutable/DoubleLinkedList.scala +++ b/src/library/scala/collection/mutable/DoubleLinkedList.scala @@ -20,7 +20,7 @@ import generic._ * @author Martin Odersky * @version 2.8 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_28.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#double_linked_lists "Scala's Collection Library overview"]] * section on `Double Linked Lists` for more information. * diff --git a/src/library/scala/collection/mutable/HashMap.scala b/src/library/scala/collection/mutable/HashMap.scala index 3c26ef0ab6..65a10f4ba9 100644 --- a/src/library/scala/collection/mutable/HashMap.scala +++ b/src/library/scala/collection/mutable/HashMap.scala @@ -15,7 +15,7 @@ import scala.collection.parallel.mutable.ParHashMap /** This class implements mutable maps using a hashtable. * * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_34.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#hash_tables "Scala's Collection Library overview"]] * section on `Hash Tables` for more information. * * @tparam A the type of the keys contained in this hash map. diff --git a/src/library/scala/collection/mutable/HashSet.scala b/src/library/scala/collection/mutable/HashSet.scala index 7834c93ac4..8ed6b925aa 100644 --- a/src/library/scala/collection/mutable/HashSet.scala +++ b/src/library/scala/collection/mutable/HashSet.scala @@ -22,7 +22,7 @@ import collection.parallel.mutable.ParHashSet * @author Martin Odersky * @version 2.0, 31/12/2006 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_34.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#hash_tables "Scala's Collection Library overview"]] * section on `Hash Tables` for more information. * * @define Coll mutable.HashSet diff --git a/src/library/scala/collection/mutable/LinearSeq.scala b/src/library/scala/collection/mutable/LinearSeq.scala index 9f7443da0e..522ebfd277 100644 --- a/src/library/scala/collection/mutable/LinearSeq.scala +++ b/src/library/scala/collection/mutable/LinearSeq.scala @@ -19,8 +19,8 @@ import generic._ * * @define Coll LinearSeq * @define coll linear sequence - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_29.html "The Scala 2.8 Collections API"]] - * section on `Mutable Lists` for more information. + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#mutable_lists "Scala's Collection Library overview"]] + * section on `Mutable Lists` for more information. */ trait LinearSeq[A] extends Seq[A] with scala.collection.LinearSeq[A] diff --git a/src/library/scala/collection/mutable/LinkedList.scala b/src/library/scala/collection/mutable/LinkedList.scala index 6311a01b65..8510827697 100644 --- a/src/library/scala/collection/mutable/LinkedList.scala +++ b/src/library/scala/collection/mutable/LinkedList.scala @@ -33,7 +33,7 @@ import generic._ * @author Martin Odersky * @version 2.8 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_27.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#linked_lists "Scala's Collection Library overview"]] * section on `Linked Lists` for more information. * * @tparam A the type of the elements contained in this linked list. diff --git a/src/library/scala/collection/mutable/ListBuffer.scala b/src/library/scala/collection/mutable/ListBuffer.scala index 812b4010b4..131cdd0005 100644 --- a/src/library/scala/collection/mutable/ListBuffer.scala +++ b/src/library/scala/collection/mutable/ListBuffer.scala @@ -21,7 +21,7 @@ import immutable.{List, Nil, ::} * @author Martin Odersky * @version 2.8 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_25.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#list_buffers "Scala's Collection Library overview"]] * section on `List Buffers` for more information. * * @tparam A the type of this list buffer's elements. diff --git a/src/library/scala/collection/mutable/MutableList.scala b/src/library/scala/collection/mutable/MutableList.scala index de7f82095e..c9e44ac165 100644 --- a/src/library/scala/collection/mutable/MutableList.scala +++ b/src/library/scala/collection/mutable/MutableList.scala @@ -23,7 +23,7 @@ import immutable.{List, Nil} * @author Martin Odersky * @version 2.8 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_29.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#mutable_lists "Scala's Collection Library overview"]] * section on `Mutable Lists` for more information. */ @SerialVersionUID(5938451523372603072L) diff --git a/src/library/scala/collection/mutable/Queue.scala b/src/library/scala/collection/mutable/Queue.scala index 875ad12363..77b1ae21cb 100644 --- a/src/library/scala/collection/mutable/Queue.scala +++ b/src/library/scala/collection/mutable/Queue.scala @@ -20,7 +20,7 @@ import generic._ * @author Martin Odersky * @version 2.8 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_30.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#mutable_queues "Scala's Collection Library overview"]] * section on `Queues` for more information. * * @define Coll mutable.Queue diff --git a/src/library/scala/collection/mutable/Stack.scala b/src/library/scala/collection/mutable/Stack.scala index 0b4578dcc9..ffac3b78b7 100644 --- a/src/library/scala/collection/mutable/Stack.scala +++ b/src/library/scala/collection/mutable/Stack.scala @@ -44,8 +44,8 @@ object Stack extends SeqFactory[Stack] { * @author Martin Odersky * @version 2.8 * @since 1 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_32.html "The Scala 2.8 Collections API"]] - * section on `Array Sequences` for more information. + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#stacks"Scala's Collection Library overview"]] + * section on `Stacks` for more information. * @define Coll Stack * @define coll stack * @define orderDependent diff --git a/src/library/scala/collection/mutable/StringBuilder.scala b/src/library/scala/collection/mutable/StringBuilder.scala index 27c1404e3e..603086d209 100644 --- a/src/library/scala/collection/mutable/StringBuilder.scala +++ b/src/library/scala/collection/mutable/StringBuilder.scala @@ -21,7 +21,7 @@ import immutable.StringLike * @author Martin Odersky * @version 2.8 * @since 2.7 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_26.html "The Scala 2.8 Collections API"]] + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html# "Scala's Collection Library overview"]] * section on `StringBuilders` for more information. */ @SerialVersionUID(0 - 8525408645367278351L) diff --git a/src/library/scala/collection/mutable/WeakHashMap.scala b/src/library/scala/collection/mutable/WeakHashMap.scala index 188cca2917..89d7c7a695 100644 --- a/src/library/scala/collection/mutable/WeakHashMap.scala +++ b/src/library/scala/collection/mutable/WeakHashMap.scala @@ -23,8 +23,8 @@ import generic._ * @tparam B type of values associated with the keys * * @since 2.8 - * @see [[http://www.scala-lang.org/docu/files/collections-api/collections_34.html "The Scala 2.8 Collections API"]] - * section on `Hash Tables` for more information. + * @see [[http://docs.scala-lang.org/overviews/collections/concrete-mutable-collection-classes.html#weak_hash_maps "Scala's Collection Library overview"]] + * section on `Weak Hash Maps` for more information. * * @define Coll WeakHashMap * @define coll weak hash map diff --git a/src/library/scala/sys/process/ProcessBuilder.scala b/src/library/scala/sys/process/ProcessBuilder.scala index 9acdc59094..214d908012 100644 --- a/src/library/scala/sys/process/ProcessBuilder.scala +++ b/src/library/scala/sys/process/ProcessBuilder.scala @@ -42,7 +42,7 @@ import ProcessBuilder._ * 2. `#&&` conditionally executes the second command if the previous one finished with * exit value 0. It mirrors shell's `&&`. * 3. `#||` conditionally executes the third command if the exit value of the previous - * command is is different than zero. It mirrors shell's `&&`. + * command is different than zero. It mirrors shell's `&&`. * * Not shown here, the equivalent of a shell's `;` would be `###`. The reason for this name is * that `;` is a reserved token in Scala. diff --git a/src/library/scala/util/parsing/combinator/RegexParsers.scala b/src/library/scala/util/parsing/combinator/RegexParsers.scala index a06b9d59ce..86eecd03c4 100644 --- a/src/library/scala/util/parsing/combinator/RegexParsers.scala +++ b/src/library/scala/util/parsing/combinator/RegexParsers.scala @@ -23,7 +23,7 @@ import scala.collection.immutable.PagedSeq * - There's an implicit conversion from [[scala.util.matching.Regex]] to `Parser[String]`, * so that regex expressions can be used as parser combinators. * - The parsing methods call the method `skipWhitespace` (defaults to `true`) and, if true, - * skip any whitespace before before each parser is called. + * skip any whitespace before each parser is called. * - Protected val `whiteSpace` returns a regex that identifies whitespace. * * For example, this creates a very simple calculator receiving `String` input: diff --git a/src/library/scala/util/parsing/json/JSON.scala b/src/library/scala/util/parsing/json/JSON.scala index 1464f80e3f..15d43cf2af 100644 --- a/src/library/scala/util/parsing/json/JSON.scala +++ b/src/library/scala/util/parsing/json/JSON.scala @@ -45,7 +45,7 @@ object JSON extends Parser { /** * Parse the given `JSON` string and return a list of elements. If the * string is a `JSON` object it will be a `JSONObject`. If it's a `JSON` - * array it will be be a `JSONArray`. + * array it will be a `JSONArray`. * * @param input the given `JSON` string. * @return an optional `JSONType` element. diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala index fbcdbf893f..b0c26884af 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala @@ -887,7 +887,7 @@ opcode(Readonly, CEE_READONLY , "readonly." , 0xFFFFFE1E, POP_NONE, PUSH_NONE opcode(Bne_Un_S, CEE_BNE_UN_S, "bne.un.s", 0xFFFFFF33, POP_1_1 , PUSH_NONE, INLINE_TARGET_S, FLOW_COND_BRANCH) /** - * Transfers control to a target instruction (short form) if if the the first value is greather + * Transfers control to a target instruction (short form) if the first value is greather * than the second value, when comparing unsigned integer values or unordered float values. */ final val Bge_Un_S = new OpCode() @@ -973,7 +973,7 @@ opcode(Readonly, CEE_READONLY , "readonly." , 0xFFFFFE1E, POP_NONE, PUSH_NONE opcode(Bne_Un, CEE_BNE_UN , "bne.un", 0xFFFFFF40, POP_1_1 , PUSH_NONE, INLINE_TARGET, FLOW_COND_BRANCH) /** - * Transfers control to a target instruction if the the first value is greather than + * Transfers control to a target instruction if the first value is greather than * the second value, when comparing unsigned integer values or unordered float values. */ final val Bge_Un = new OpCode() diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala index d486c31af0..80e4267436 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala @@ -307,7 +307,7 @@ object OpCodes { final val Bne_Un_S = OpCode.Bne_Un_S /** - * Transfers control to a target instruction (short form) if if the the first value is greather + * Transfers control to a target instruction (short form) if the first value is greather * than the second value, when comparing unsigned integer values or unordered float values. */ final val Bge_Un_S = OpCode.Bge_Un_S @@ -380,7 +380,7 @@ object OpCodes { final val Bne_Un = OpCode.Bne_Un /** - * Transfers control to a target instruction if the the first value is greather than + * Transfers control to a target instruction if the first value is greather than * the second value, when comparing unsigned integer values or unordered float values. */ final val Bge_Un = OpCode.Bge_Un |