From f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 6 Apr 2010 01:26:31 +0000 Subject: As a brief diversion from real work, implemente... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a brief diversion from real work, implemented Damerau–Levenshtein and ran it on trunk to elicit obvious misspellings. Unfortunately they're mostly in places like compiler comments which real people never see, but I fixed them anyway. All those English Lit majors who peruse our sources are sure to be pleased. No review. --- docs/examples/parsing/lambda/TestParser.scala | 2 +- docs/examples/pilib/elasticBuffer.scala | 2 +- docs/examples/pilib/mobilePhoneProtocol.scala | 2 +- .../src/plugintemplate/standalone/Main.scala | 4 ++-- src/attic/scala/tools/nsc/models/Models.scala | 3 --- src/compiler/scala/tools/ant/Pack200Task.scala | 2 +- src/compiler/scala/tools/ant/ScalaTool.scala | 2 +- src/compiler/scala/tools/ant/sabbus/Use.scala | 2 +- src/compiler/scala/tools/nsc/Global.scala | 4 ++-- src/compiler/scala/tools/nsc/Interpreter.scala | 2 +- src/compiler/scala/tools/nsc/PhaseAssembly.scala | 2 +- src/compiler/scala/tools/nsc/ScriptRunner.scala | 2 +- src/compiler/scala/tools/nsc/ast/DocComments.scala | 2 +- .../scala/tools/nsc/ast/NodePrinters.scala | 2 +- .../scala/tools/nsc/ast/parser/Parsers.scala | 2 +- .../scala/tools/nsc/ast/parser/Scanners.scala | 2 +- .../scala/tools/nsc/ast/parser/TreeBuilder.scala | 2 +- .../scala/tools/nsc/backend/ScalaPrimitives.scala | 4 ++-- .../tools/nsc/backend/icode/BasicBlocks.scala | 6 +++--- .../scala/tools/nsc/backend/icode/Checkers.scala | 2 +- .../scala/tools/nsc/backend/icode/GenICode.scala | 8 ++++---- .../scala/tools/nsc/backend/icode/Opcodes.scala | 2 +- .../scala/tools/nsc/backend/jvm/GenJVM.scala | 6 +++--- .../scala/tools/nsc/backend/msil/GenMSIL.scala | 12 ++++++------ .../tools/nsc/backend/opt/ClosureElimination.scala | 2 +- .../nsc/backend/opt/DeadCodeElimination.scala | 2 +- .../scala/tools/nsc/backend/opt/Inliners.scala | 2 +- .../scala/tools/nsc/doc/html/page/Source.scala | 2 +- .../scala/tools/nsc/doc/model/TypeEntity.scala | 2 +- .../nsc/doc/model/comment/CommentFactory.scala | 2 +- .../tools/nsc/interactive/CompilerControl.scala | 2 +- .../scala/tools/nsc/interactive/Global.scala | 4 ++-- .../tools/nsc/interactive/RangePositions.scala | 2 +- .../nsc/interactive/RefinedBuildManager.scala | 4 ++-- .../tools/nsc/interpreter/InteractiveReader.scala | 2 +- src/compiler/scala/tools/nsc/io/File.scala | 2 +- src/compiler/scala/tools/nsc/plugins/Plugins.scala | 4 ++-- .../scala/tools/nsc/symtab/AnnotationInfos.scala | 2 +- .../scala/tools/nsc/symtab/Definitions.scala | 4 ++-- .../scala/tools/nsc/symtab/Positions.scala | 2 +- src/compiler/scala/tools/nsc/symtab/Scopes.scala | 4 ++-- src/compiler/scala/tools/nsc/symtab/Symbols.scala | 14 +++++++------- src/compiler/scala/tools/nsc/symtab/Types.scala | 16 ++++++++-------- .../nsc/symtab/classfile/ClassfileConstants.scala | 2 +- .../nsc/symtab/classfile/ClassfileParser.scala | 6 +++--- .../tools/nsc/symtab/classfile/ICodeReader.scala | 2 +- .../scala/tools/nsc/symtab/classfile/Pickler.scala | 2 +- .../scala/tools/nsc/transform/AddInterfaces.scala | 2 +- .../scala/tools/nsc/transform/CleanUp.scala | 6 +++--- .../scala/tools/nsc/transform/Constructors.scala | 2 +- .../scala/tools/nsc/transform/Erasure.scala | 4 ++-- .../scala/tools/nsc/transform/ExplicitOuter.scala | 2 +- .../scala/tools/nsc/transform/LambdaLift.scala | 2 +- .../scala/tools/nsc/transform/LazyVals.scala | 2 +- src/compiler/scala/tools/nsc/transform/Mixin.scala | 8 ++++---- .../tools/nsc/transform/OverridingPairs.scala | 14 +++++++------- .../tools/nsc/transform/SpecializeTypes.scala | 22 +++++++++++----------- .../scala/tools/nsc/transform/TailCalls.scala | 2 +- .../tools/nsc/transform/TypingTransformers.scala | 2 +- .../scala/tools/nsc/transform/UnCurry.scala | 6 +++--- .../scala/tools/nsc/typechecker/DeVirtualize.scala | 2 +- .../scala/tools/nsc/typechecker/EtaExpansion.scala | 2 +- .../scala/tools/nsc/typechecker/Implicits.scala | 6 +++--- .../scala/tools/nsc/typechecker/Infer.scala | 10 +++++----- .../scala/tools/nsc/typechecker/Namers.scala | 10 +++++----- .../tools/nsc/typechecker/NamesDefaults.scala | 2 +- .../scala/tools/nsc/typechecker/RefChecks.scala | 2 +- .../scala/tools/nsc/typechecker/Typers.scala | 18 +++++++++--------- src/compiler/scala/tools/nsc/util/DocStrings.scala | 2 +- src/compiler/scala/tools/util/PathResolver.scala | 2 +- src/dbc/scala/dbc/datatype/Factory.scala | 2 +- .../scala/concurrent/forkjoin/RecursiveTask.java | 2 +- src/library/scala/Array.scala | 4 ++-- src/library/scala/Enumeration.scala | 2 +- src/library/scala/Immutable.scala | 2 +- src/library/scala/Predef.scala | 2 +- src/library/scala/collection/Iterator.scala | 14 +++++++------- src/library/scala/collection/JavaConversions.scala | 2 +- .../scala/collection/LinearSeqOptimized.scala | 2 +- src/library/scala/collection/MapLike.scala | 4 ++-- src/library/scala/collection/SeqLike.scala | 12 ++++++------ src/library/scala/collection/SetLike.scala | 2 +- .../scala/collection/TraversableProxy.scala | 2 +- src/library/scala/collection/TraversableView.scala | 2 +- .../collection/generic/IterableForwarder.scala | 2 +- .../scala/collection/immutable/IntMap.scala | 2 +- src/library/scala/collection/immutable/List.scala | 4 ++-- .../scala/collection/immutable/ListMap.scala | 2 +- .../scala/collection/immutable/LongMap.scala | 2 +- .../scala/collection/immutable/PagedSeq.scala | 6 +++--- .../scala/collection/mutable/ArrayBuffer.scala | 4 ++-- .../scala/collection/mutable/FlatHashTable.scala | 2 +- .../scala/collection/mutable/GrowingBuilder.scala | 2 +- .../scala/collection/mutable/HashTable.scala | 2 +- src/library/scala/collection/mutable/MapLike.scala | 8 ++++---- .../mutable/SynchronizedPriorityQueue.scala | 2 +- src/library/scala/math/BigInt.scala | 2 +- src/library/scala/reflect/generic/StdNames.scala | 2 +- src/library/scala/reflect/generic/Symbols.scala | 2 +- src/library/scala/reflect/generic/Trees.scala | 4 ++-- src/library/scala/reflect/generic/Types.scala | 2 +- src/library/scala/reflect/generic/UnPickler.scala | 4 ++-- src/library/scala/runtime/ScalaRunTime.scala | 2 +- .../scala/util/automata/SubsetConstruction.scala | 2 +- .../scala/util/automata/WordBerrySethi.scala | 2 +- src/library/scala/util/matching/Regex.scala | 2 +- .../scala/util/parsing/combinator/Parsers.scala | 6 +++--- src/library/scala/xml/dtd/Decl.scala | 2 +- src/library/scala/xml/include/sax/Main.scala | 2 +- .../scala/xml/parsing/DefaultMarkupHandler.scala | 2 +- src/library/scala/xml/parsing/MarkupHandler.scala | 2 +- src/library/scala/xml/parsing/MarkupParser.scala | 2 +- src/msil/ch/epfl/lamp/compiler/msil/Attribute.java | 2 +- .../lamp/compiler/msil/emit/ILPrinterVisitor.scala | 2 +- .../lamp/compiler/msil/emit/MethodBuilder.scala | 2 +- .../msil/emit/MultipleFilesILPrinterVisitor.scala | 4 ++-- .../ch/epfl/lamp/compiler/msil/emit/OpCode.scala | 4 ++-- .../ch/epfl/lamp/compiler/msil/emit/OpCodes.scala | 4 ++-- .../msil/emit/SingleFileILPrinterVisitor.scala | 2 +- .../scala/tools/scalap/scalax/rules/Functors.scala | 4 ++-- .../scala/tools/scalap/scalax/rules/Rules.scala | 2 +- .../scalax/rules/scalasig/ScalaSigPrinter.scala | 4 ++-- src/swing/scala/swing/SimpleGUIApplication.scala | 4 ++-- src/swing/scala/swing/event/TableEvent.scala | 2 +- test/files/buildmanager/t2556_3/t2556_3.check | 2 +- test/files/neg/t0528neg.scala | 2 +- test/files/pos/spec-List.scala | 2 +- test/files/pos/t1164.scala | 2 +- test/files/pos/t1756.scala | 2 +- test/files/run/t0528.scala | 2 +- test/files/run/t2526.scala | 2 +- test/pending/pos/t0644.scala | 11 ----------- 132 files changed, 237 insertions(+), 251 deletions(-) delete mode 100644 test/pending/pos/t0644.scala diff --git a/docs/examples/parsing/lambda/TestParser.scala b/docs/examples/parsing/lambda/TestParser.scala index 22257c1731..623b597337 100644 --- a/docs/examples/parsing/lambda/TestParser.scala +++ b/docs/examples/parsing/lambda/TestParser.scala @@ -20,7 +20,7 @@ trait TestParser extends StdTokenParsers with ImplicitConversions with TestSynt def name : Parser[Name] = ident ^^ Name - // meaning of the argumens to the closure during subsequent iterations + // meaning of the arguments to the closure during subsequent iterations // (...(expr2 op1 expr1) ... op1 expr1) // ^a^^^ ^o^ ^b^^^ // ^^^^^^^a^^^^^^^ ^o^ ^^b^^ diff --git a/docs/examples/pilib/elasticBuffer.scala b/docs/examples/pilib/elasticBuffer.scala index e156cafbc2..a0e8bb6a7c 100644 --- a/docs/examples/pilib/elasticBuffer.scala +++ b/docs/examples/pilib/elasticBuffer.scala @@ -64,7 +64,7 @@ object elasticBuffer { def Consumer(get: Chan[String]): Unit = { Thread.sleep(1 + random.nextInt(1000)) val msg = get.read - System.out.println("Consummer took " + msg) + System.out.println("Consumer took " + msg) Consumer(get) } diff --git a/docs/examples/pilib/mobilePhoneProtocol.scala b/docs/examples/pilib/mobilePhoneProtocol.scala index 385836318b..0805253ae0 100644 --- a/docs/examples/pilib/mobilePhoneProtocol.scala +++ b/docs/examples/pilib/mobilePhoneProtocol.scala @@ -158,7 +158,7 @@ object mobilePhoneProtocol { def Consumer(get: Chan[String]): unit = { Thread.sleep(1 + random.nextInt(1000)); val msg = get.read; - System.out.println("Consummer took " + msg); + System.out.println("Consumer took " + msg); Consumer(get) } diff --git a/docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala b/docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala index 53e5e40104..bea6eeee26 100644 --- a/docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala +++ b/docs/examples/plugintemplate/src/plugintemplate/standalone/Main.scala @@ -17,7 +17,7 @@ object Main { val command = new CompilerCommand(args.toList, settings, println, false) { /** The command name that will be printed in in the usage message. - * This is autmatically set to the value of 'plugin.commandname' in the + * This is automatically set to the value of 'plugin.commandname' in the * file build.properties. */ override val cmdName = PluginProperties.pluginCommand @@ -26,7 +26,7 @@ object Main { if (!command.ok) return() - /** The version number of this plugin is read from the porperties file + /** The version number of this plugin is read from the properties file */ if (settings.version.value) { println(command.cmdName +" version "+ PluginProperties.versionString) diff --git a/src/attic/scala/tools/nsc/models/Models.scala b/src/attic/scala/tools/nsc/models/Models.scala index a45d0d8877..438a9d3f2c 100644 --- a/src/attic/scala/tools/nsc/models/Models.scala +++ b/src/attic/scala/tools/nsc/models/Models.scala @@ -262,7 +262,6 @@ abstract class Models { } abstract class ValOrDefMod(parent0: Composite) extends MemberComposite(parent0) with HasClassObjects { - def treey = tree.asInstanceOf[ValOrDefDef] override def replacedBy(tree0: Tree): Boolean = super.replacedBy(tree0) && tree0.isInstanceOf[ValOrDefDef] @@ -296,7 +295,6 @@ abstract class Models { abstract class ImplMod(parent0: Composite) extends MemberComposite(parent0) with HasClassObjects { - def treey = tree.asInstanceOf[ImplDef] override def replacedBy(tree0: Tree): Boolean = super.replacedBy(tree0) && tree0.isInstanceOf[ImplDef] override def isMember(tree: Tree): Boolean = (super.isMember(tree) || @@ -361,7 +359,6 @@ abstract class Models { super.replacedBy(tree0) && tree0.isInstanceOf[ModuleDef] } class TypeMod(parent0: Composite) extends MemberMod(parent0) { - def treey = tree.asInstanceOf[TypeDef]; override def replacedBy(tree0 : Tree) : Boolean = (super.replacedBy(tree0) && tree0.isInstanceOf[TypeDef]); } def SourceMod(original: CompilationUnit) = new SourceMod(original) diff --git a/src/compiler/scala/tools/ant/Pack200Task.scala b/src/compiler/scala/tools/ant/Pack200Task.scala index 7d7d555226..12a8706a1c 100644 --- a/src/compiler/scala/tools/ant/Pack200Task.scala +++ b/src/compiler/scala/tools/ant/Pack200Task.scala @@ -71,7 +71,7 @@ class Pack200Task extends MatchingTask { * is used to remove empty packages and improve pack200 optimization. * @param keep * true to retain file ordering. - * false to optomize directory structure (DEFAULT). */ + * false to optimize directory structure (DEFAULT). */ def setKeepFileOrder(x: Boolean) { keepFileOrder = x } /** If false, a single modification time is used for all contained files */ diff --git a/src/compiler/scala/tools/ant/ScalaTool.scala b/src/compiler/scala/tools/ant/ScalaTool.scala index f9f97140aa..90f1fcaeda 100644 --- a/src/compiler/scala/tools/ant/ScalaTool.scala +++ b/src/compiler/scala/tools/ant/ScalaTool.scala @@ -72,7 +72,7 @@ class ScalaTool extends MatchingTask { private var classpathPath: Path = emptyPath /** Comma-separated Java system properties to pass to the JRE. Properties - * are formated as name=value. Properties scala.home, scala.tool.name and + * are formatted as name=value. Properties scala.home, scala.tool.name and * scala.tool.version are always set. */ private var properties: List[(String, String)] = Nil diff --git a/src/compiler/scala/tools/ant/sabbus/Use.scala b/src/compiler/scala/tools/ant/sabbus/Use.scala index 792efc3af8..fa17c48b63 100644 --- a/src/compiler/scala/tools/ant/sabbus/Use.scala +++ b/src/compiler/scala/tools/ant/sabbus/Use.scala @@ -61,7 +61,7 @@ class Use extends MatchingTask { if (errors > 0) error("Compilation failed with " + errors + " error" + (if (errors > 1) "s" else "") + ".") else if (warnings > 0) - log("Compilation suceeded with " + warnings + " warning" + (if (warnings > 1) "s" else "") + ".") + log("Compilation succeeded with " + warnings + " warning" + (if (warnings > 1) "s" else "") + ".") } catch { case CompilationFailure(msg, ex) => diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 8219edd464..1cc035008d 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -125,7 +125,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable // ------------ Hooks for interactive mode------------------------- - /** Called every time an AST node is succesfully typedchecked in typerPhase. + /** Called every time an AST node is successfully typechecked in typerPhase. */ def signalDone(context: analyzer.Context, old: Tree, result: Tree) {} @@ -584,7 +584,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable curRun = this //Console.println("starting run: " + id) - // Can not take the phaseDescriptors.head even though its the syntaxAnalyser, this will implicitly + // Can not take the phaseDescriptors.head even though its the syntaxAnalyzer, this will implicitly // call definitions.init which uses phase and needs it to be != NoPhase val phase1 = syntaxAnalyzer.newPhase(NoPhase) phase = phase1 diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala index 9e1c034f86..0cc0f65640 100644 --- a/src/compiler/scala/tools/nsc/Interpreter.scala +++ b/src/compiler/scala/tools/nsc/Interpreter.scala @@ -524,7 +524,7 @@ class Interpreter(val settings: Settings, out: PrintWriter) { ) /** Compile an nsc SourceFile. Returns true if there are - * no compilation errors, or false othrewise. + * no compilation errors, or false otherwise. */ def compileSources(sources: SourceFile*): Boolean = { reporter.reset diff --git a/src/compiler/scala/tools/nsc/PhaseAssembly.scala b/src/compiler/scala/tools/nsc/PhaseAssembly.scala index fb90b004ff..b3300a1ff9 100644 --- a/src/compiler/scala/tools/nsc/PhaseAssembly.scala +++ b/src/compiler/scala/tools/nsc/PhaseAssembly.scala @@ -12,7 +12,7 @@ import java.io.{BufferedWriter, FileWriter} /** * PhaseAssembly - * Trait made to seperate the constraint solving of the phase order from + * Trait made to separate the constraint solving of the phase order from * the rest of the compiler. See SIP 00002 * */ diff --git a/src/compiler/scala/tools/nsc/ScriptRunner.scala b/src/compiler/scala/tools/nsc/ScriptRunner.scala index adf442fc0e..a096efb749 100644 --- a/src/compiler/scala/tools/nsc/ScriptRunner.scala +++ b/src/compiler/scala/tools/nsc/ScriptRunner.scala @@ -185,7 +185,7 @@ object ScriptRunner new CompoundSourceFile(preamble, middle, end) } - /** Compile a script using the fsc compilation deamon. + /** Compile a script using the fsc compilation daemon. * * @param settings ... * @param scriptFileIn ... diff --git a/src/compiler/scala/tools/nsc/ast/DocComments.scala b/src/compiler/scala/tools/nsc/ast/DocComments.scala index 34b1c97f0c..3144d8140d 100755 --- a/src/compiler/scala/tools/nsc/ast/DocComments.scala +++ b/src/compiler/scala/tools/nsc/ast/DocComments.scala @@ -29,7 +29,7 @@ trait DocComments { self: SymbolTable => /** The position of the raw doc comment of symbol `sym`, or NoPosition if missing * If a symbol does not have a doc comment but some overridden version of it does, - * the posititon of the doc comment of the overridden version is returned instead. + * the position of the doc comment of the overridden version is returned instead. */ def docCommentPos(sym: Symbol): Position = getDocComment(sym) map (_.pos) getOrElse NoPosition diff --git a/src/compiler/scala/tools/nsc/ast/NodePrinters.scala b/src/compiler/scala/tools/nsc/ast/NodePrinters.scala index b8117ceaa4..ccab6423cf 100644 --- a/src/compiler/scala/tools/nsc/ast/NodePrinters.scala +++ b/src/compiler/scala/tools/nsc/ast/NodePrinters.scala @@ -80,7 +80,7 @@ abstract class NodePrinters { if (sym hasFlag COVARIANT ) buf.append(" | COVARIANT") if (sym hasFlag CAPTURED ) buf.append(" | CAPTURED") if (sym hasFlag BYNAMEPARAM ) buf.append(" | BYNAMEPARAM") - if (sym hasFlag CONTRAVARIANT) buf.append(" | CONTRVARIANT") + if (sym hasFlag CONTRAVARIANT) buf.append(" | CONTRAVARIANT") if (sym hasFlag LABEL ) buf.append(" | LABEL") if (sym hasFlag INCONSTRUCTOR) buf.append(" | INCONSTRUCTOR") if (sym hasFlag ABSOVERRIDE ) buf.append(" | ABSOVERRIDE") diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 30aaf56ceb..1cfee481bc 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1576,7 +1576,7 @@ self => /* -------- MODIFIERS and ANNOTATIONS ------------------------------------------- */ - /** Drop `private' modifier when follwed by a qualifier. + /** Drop `private' modifier when followed by a qualifier. * Conract `abstract' and `override' to ABSOVERRIDE */ private def normalize(mods: Modifiers): Modifiers = diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala index f4fa6fd75b..eeb3fb6e7a 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala @@ -802,7 +802,7 @@ trait Scanners { } /** Parse character literal if current character is followed by \', - * or follow with given op and return a symol literal token + * or follow with given op and return a symbol literal token */ def charLitOr(op: () => Unit) { putChar(ch) diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala index 812ad23078..bea52b1153 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala @@ -205,7 +205,7 @@ abstract class TreeBuilder { } } - /** Create a tree represeting an assignment <lhs = rhs> */ + /** Create a tree representing an assignment <lhs = rhs> */ def makeAssign(lhs: Tree, rhs: Tree): Tree = lhs match { case Apply(fn, args) => Apply(atPos(fn.pos) { Select(fn, nme.update) }, args ::: List(rhs)) diff --git a/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala b/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala index 90261288ee..b95e3335ba 100644 --- a/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala +++ b/src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala @@ -562,9 +562,9 @@ abstract class ScalaPrimitives { def isPrimitive(sym: Symbol): Boolean = primitives contains sym - /** Return the code for the givem symbol. */ + /** Return the code for the given symbol. */ def getPrimitive(sym: Symbol): Int = { - assert(isPrimitive(sym), "Unkown primitive " + sym) + assert(isPrimitive(sym), "Unknown primitive " + sym) primitives(sym) } diff --git a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala index 4aa8bcf8c5..e5afa84c82 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala @@ -201,7 +201,7 @@ trait BasicBlocks { } /** Replaces iold with is. It does not update - * the position field in the newly inserted instrucitons, so it behaves + * the position field in the newly inserted instructions, so it behaves * differently than the one-instruction versions of this function. * * @param iold .. @@ -335,7 +335,7 @@ trait BasicBlocks { } /** Emitting does not set touched to true. During code generation this is a hotspot and - * setting the flag for each emit is a waste. Caching should happend only after a block + * setting the flag for each emit is a waste. Caching should happen only after a block * is closed, which sets the DIRTYSUCCS flag. */ def emit(instr: Instruction, pos: Position) { @@ -493,7 +493,7 @@ trait BasicBlocks { succs.flatMap(findSucc).distinct } - /** Returns the precessors of this block. */ + /** Returns the predecessors of this block. */ def predecessors: List[BasicBlock] = { if (hasFlag(DIRTYPREDS)) { resetFlag(DIRTYPREDS) diff --git a/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala b/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala index c3fadb1abf..c34cefdc12 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala @@ -94,7 +94,7 @@ abstract class Checkers { clasz.methods.foreach(check) } - /** Apply the give funtion to each pair of the cartesian product of + /** Apply the give function to each pair of the cartesian product of * l1 x l2. */ def pairwise[a](l1: List[a], l2: List[a])(f: (a, a) => Unit) = diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala index a073943cd3..b1d1849c71 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala @@ -51,7 +51,7 @@ abstract class GenICode extends SubComponent { var unit: CompilationUnit = _ - // We assume definitions are alread initialized + // We assume definitions are already initialized val STRING = REFERENCE(StringClass) // this depends on the backend! should be changed. @@ -1445,7 +1445,7 @@ abstract class GenICode extends SubComponent { assert(ctx.clazz.symbol eq cls, "Classes are not the same: " + ctx.clazz.symbol + ", " + cls) - /** Non-method term members are fields, except for moudle members. Module + /** Non-method term members are fields, except for module members. Module * members can only happen on .NET (no flatten) for inner traits. There, * a module symbol is generated (transformInfo in mixin) which is used * as owner for the members of the implementation class (so that the @@ -1909,7 +1909,7 @@ abstract class GenICode extends SubComponent { val kind = toTypeKind(tree.tpe) val guardResult = kind != UNIT && mayCleanStack(finalizer) // we need to save bound labels before any code generation is performed on - // the current context (otherwise, any new lables in the finalizer that need to + // the current context (otherwise, any new labels in the finalizer that need to // be duplicated would be incorrectly considered bound -- see #2850). val boundLabels: collection.Set[Symbol] = Set.empty ++ labels.keySet @@ -2129,7 +2129,7 @@ abstract class GenICode extends SubComponent { ///////////////// Fake instructions ////////////////////////// /** - * Pseudo jump: it takes a Label instead of a basick block. + * Pseudo jump: it takes a Label instead of a basic block. * It is used temporarily during code generation. It is replaced * by a real JUMP instruction when all labels are resolved. */ diff --git a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala index be580d7154..c0255cda65 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala @@ -355,7 +355,7 @@ trait Opcodes { self: ICodes => 0 else 1 - /** object idenity is equality for CALL_METHODs. Needed for + /** object identity is equality for CALL_METHODs. Needed for * being able to store such instructions into maps, when more * than one CALL_METHOD to the same method might exist. */ diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index d093f5c1c9..40eb08adfd 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -352,7 +352,7 @@ abstract class GenJVM extends SubComponent { val buf: ByteBuffer = ByteBuffer.allocate(512) var nattr = 0 - // put some radom value; the actual number is determined at the end + // put some random value; the actual number is determined at the end buf.putShort(0xbaba.toShort) for (AnnotationInfo(tp, List(exc), _) <- excs.distinct if tp.typeSymbol == definitions.ThrowsClass) { @@ -369,7 +369,7 @@ abstract class GenJVM extends SubComponent { } /** Whether an annotation should be emitted as a Java annotation - * .initialize: if 'annnot' is read from pickle, atp might be un-initialized + * .initialize: if 'annot' is read from pickle, atp might be un-initialized */ private def shouldEmitAnnotation(annot: AnnotationInfo) = (annot.atp.typeSymbol.initialize.hasFlag(Flags.JAVA) && @@ -1087,7 +1087,7 @@ abstract class GenJVM extends SubComponent { case LOAD_MODULE(module) => // assert(module.isModule, "Expected module: " + module) if (settings.debug.value) - log("genearting LOAD_MODULE for: " + module + " flags: " + + log("generating LOAD_MODULE for: " + module + " flags: " + Flags.flagsToString(module.flags)); if (clasz.symbol == module.moduleClass && jmethod.getName() != nme.readResolve.toString) jcode.emitALOAD_0() diff --git a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala index f4cf5a7089..285e09295d 100644 --- a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala +++ b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala @@ -325,7 +325,7 @@ abstract class GenMSIL extends SubComponent { annType.CreateType() // else, GetConstructors can't be used val constr: ConstructorInfo = annType.GetConstructors()(0) // prevent a second call of CreateType, only needed because there's no - // otehr way than GetConstructors()(0) to get the constructor, if there's + // other way than GetConstructors()(0) to get the constructor, if there's // no constructor symbol available. val args: Array[Byte] = @@ -601,7 +601,7 @@ abstract class GenMSIL extends SubComponent { genBlocks(linearization) // RETURN inside exception blocks are replaced by Leave. The target of the - // levae is a `Ret` outside any exception block (generated here). + // leave is a `Ret` outside any exception block (generated here). if (handlerReturnMethod == m) { mcode.MarkLabel(handlerReturnLabel) if (handlerReturnKind != UNIT) @@ -1467,7 +1467,7 @@ abstract class GenMSIL extends SubComponent { def emitBrBool(cond: TestOp, dest: Label) { cond match { // EQ -> Brfalse, NE -> Brtrue; this is because we come from - // a CZJUMP. If the value on the stack is 0 (e.g. a boolen + // a CZJUMP. If the value on the stack is 0 (e.g. a boolean // method returned false), and we are in the case EQ, then // we need to emit Brfalse (EQ Zero means false). vice versa case EQ => mcode.Emit(OpCodes.Brfalse, dest) @@ -1599,7 +1599,7 @@ abstract class GenMSIL extends SubComponent { if (sym.isStaticMember) mf = mf | FieldAttributes.Static - // TRANSIENT: "not nerialized", VOLATILE: doesn't exist on .net + // TRANSIENT: "not serialized", VOLATILE: doesn't exist on .net // TODO: add this annotation also if the class has the custom attribute // System.NotSerializedAttribute sym.annotations.foreach( a => a match { @@ -1874,7 +1874,7 @@ abstract class GenMSIL extends SubComponent { /** Adds a static initializer which creates an instance of the module * class (calls the primary constructor). A special primary constructor - * will be generated (notInitializedModules) which stores the new intance + * will be generated (notInitializedModules) which stores the new instance * in the MODULE$ field right after the super call. */ private def addStaticInit(sym: Symbol) { @@ -2131,7 +2131,7 @@ abstract class GenMSIL extends SubComponent { } /* - * add maping for member with name and paramTypes to member + * add mapping for member with name and paramTypes to member * newName of newClass (same parameters) */ private def mapMethod( diff --git a/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala index 1812753ccd..7311978147 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala @@ -37,7 +37,7 @@ abstract class ClosureElimination extends SubComponent { } /** - * Remove references to the environemnt through fields of a closure object. + * Remove references to the environment through fields of a closure object. * This has to be run after an 'apply' method has been inlined, but it still * references the closure object. * diff --git a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala index b9d4b8d5a4..29d0c37c84 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala @@ -130,7 +130,7 @@ abstract class DeadCodeElimination extends SubComponent { } /** Mark useful instructions. Instructions in the worklist are each inspected and their - * dependecies are marked useful too, and added to the worklist. + * dependencies are marked useful too, and added to the worklist. */ def mark { // log("Starting with worklist: " + worklist) diff --git a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala index 22667dff49..cb87301b6a 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala @@ -104,7 +104,7 @@ abstract class Inliners extends SubComponent { } val instrAfter = block.toList.drop(instrBefore.length + 1); - assert(!instrAfter.isEmpty, "CALL_METHOD cannot be the last instrcution in block!"); + assert(!instrAfter.isEmpty, "CALL_METHOD cannot be the last instruction in block!"); // store the '$this' into the special local val inlinedThis = new Local(caller.symbol.newVariable(instr.pos, freshName("$inlThis")), REFERENCE(definitions.ObjectClass), false); diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Source.scala b/src/compiler/scala/tools/nsc/doc/html/page/Source.scala index f0206db4f4..22568e0a88 100644 --- a/src/compiler/scala/tools/nsc/doc/html/page/Source.scala +++ b/src/compiler/scala/tools/nsc/doc/html/page/Source.scala @@ -24,7 +24,7 @@ class Source(sourceFile: File) extends HtmlPage { val body = -

Page source is not implmented yet

+

Page source is not implemented yet

/* diff --git a/src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala b/src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala index 681ef4e02a..989dfa048e 100644 --- a/src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala +++ b/src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala @@ -11,7 +11,7 @@ import scala.collection._ abstract class TypeEntity { - /** A string reprsentation of this type. */ + /** A string representation of this type. */ def name: String /** Maps which parts of this type's name reference other entities. The map is indexed by the position of the first diff --git a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala index 1f4794baf8..1a0bf37a84 100644 --- a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala +++ b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala @@ -247,7 +247,7 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory => protected final class WikiParser(val buffer: Array[Char], pos: Position) extends CharReader(buffer) { wiki => /** listStyle ::= '-' spc | '1.' spc | 'I.' spc | 'i.' spc | 'A.' spc | 'a.' spc - * Characters used to build lists and their contructors */ + * Characters used to build lists and their constructors */ protected val listStyles = Map[String, (Seq[Block] => Block)]( // TODO Should this be defined at some list companion? "- " -> ( UnorderedList(_) ), "1. " -> ( OrderedList(_,"decimal") ), diff --git a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala index 5c16bb4465..26f7fb1115 100644 --- a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala +++ b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala @@ -134,7 +134,7 @@ trait CompilerControl { self: Global => /** Tell the compile server to shutdown, and do not restart again */ def askShutdown() = scheduler raise ShutdownReq - // ---------------- Interpreted exeptions ------------------- + // ---------------- Interpreted exceptions ------------------- object CancelActionReq extends ControlThrowable object FreshRunReq extends ControlThrowable diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 73b728d646..03fd92235d 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -110,7 +110,7 @@ self => // ----------------- Polling --------------------------------------- /** Called from runner thread and signalDone: - * Poll for exeptions. + * Poll for exceptions. * Poll for work reload/typedTreeAt/doFirst commands during background checking. */ def pollForWork() { @@ -269,7 +269,7 @@ self => firsts = fs ::: (firsts diff fs) } - // ----------------- Implementations of client commmands ----------------------- + // ----------------- Implementations of client commands ----------------------- def respond[T](result: Response[T])(op: => T): Unit = try { diff --git a/src/compiler/scala/tools/nsc/interactive/RangePositions.scala b/src/compiler/scala/tools/nsc/interactive/RangePositions.scala index 0186103aa1..337f306664 100644 --- a/src/compiler/scala/tools/nsc/interactive/RangePositions.scala +++ b/src/compiler/scala/tools/nsc/interactive/RangePositions.scala @@ -103,7 +103,7 @@ self: scala.tools.nsc.Global => /** Ensure that given tree has no positions that overlap with * any of the positions of `others`. This is done by - * shortening the range or assinging TransparentPositions + * shortening the range or assigning TransparentPositions * to some of the nodes in `tree`. */ override def ensureNonOverlapping(tree: Tree, others: List[Tree]) { diff --git a/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala b/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala index bcc58ec448..3f59824ec2 100644 --- a/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala +++ b/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala @@ -104,7 +104,7 @@ class RefinedBuildManager(val settings: Settings) extends Changes with BuildMana mutable.HashMap[AbstractFile, immutable.Set[AbstractFile]]() compiler.reporter.reset - // See if we really have coresponding symbols, not just those + // See if we really have corresponding symbols, not just those // which share the name def isCorrespondingSym(from: Symbol, to: Symbol): Boolean = (from.hasFlag(Flags.TRAIT) == to.hasFlag(Flags.TRAIT)) && @@ -301,7 +301,7 @@ class RefinedBuildManager(val settings: Settings) extends Changes with BuildMana defs <- definitions.get(classFile); s <- defs.find(p => p.sym.fullName == q) if ((s.sym).tpe.nonPrivateMember(member) == compiler.NoSymbol)) - invalidate(file, "it references invalid (no longer inherited) defintion", change) + invalidate(file, "it references invalid (no longer inherited) definition", change) () case _ => () } diff --git a/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala b/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala index 932450b01a..b3957e1062 100644 --- a/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala +++ b/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala @@ -23,7 +23,7 @@ trait InteractiveReader { catching(handler) { readOneLine(prompt) } } - // overide if history is available + // override if history is available def history: Option[History] = None def historyList = history map (_.asList) getOrElse Nil diff --git a/src/compiler/scala/tools/nsc/io/File.scala b/src/compiler/scala/tools/nsc/io/File.scala index efa4ab46da..887bf4b55d 100644 --- a/src/compiler/scala/tools/nsc/io/File.scala +++ b/src/compiler/scala/tools/nsc/io/File.scala @@ -51,7 +51,7 @@ import Path._ /** An abstraction for files. For character data, a Codec * can be supplied at either creation time or when a method * involving character data is called (with the latter taking - * precdence if supplied.) If neither is available, the value + * precedence if supplied.) If neither is available, the value * of scala.io.Codec.default is used. * * @author Paul Phillips diff --git a/src/compiler/scala/tools/nsc/plugins/Plugins.scala b/src/compiler/scala/tools/nsc/plugins/Plugins.scala index 8a86c982d9..e800e0f904 100644 --- a/src/compiler/scala/tools/nsc/plugins/Plugins.scala +++ b/src/compiler/scala/tools/nsc/plugins/Plugins.scala @@ -30,9 +30,9 @@ trait Plugins val dirs = (settings.pluginsDir.value split File.pathSeparator).toList map Path.apply val classes = Plugin.loadAllFrom(jars, dirs, settings.disable.value) - // Lach plugin must only be instantiated once. A commong pattern + // Lach plugin must only be instantiated once. A common pattern // is to register annotation checkers during object construction, so - // creating multiple plugin instances will leave behind stale checkers. s + // creating multiple plugin instances will leave behind stale checkers. classes map (Plugin.instantiate(_, this)) } diff --git a/src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala b/src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala index f32c232316..efb68c4873 100644 --- a/src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala +++ b/src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala @@ -74,7 +74,7 @@ trait AnnotationInfos extends reflect.generic.AnnotationInfos { self: SymbolTabl * class). *

*

- * Annotations are pickled (written to scala symbtab attribute + * Annotations are pickled (written to scala symtab attribute * in the classfile) if atp inherits form * StaticAnnotation. *

diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala index 2d4d01623d..73d5193ed0 100644 --- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala +++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala @@ -823,7 +823,7 @@ trait Definitions extends reflect.generic.StandardDefinitions { // #2264 var tmp = AnnotationDefaultAttr - tmp = RepeatedParamClass // force initalization + tmp = RepeatedParamClass // force initialization if (forMSIL) { val intType = IntClass.typeConstructor val intParam = List(intType) @@ -871,7 +871,7 @@ trait Definitions extends reflect.generic.StandardDefinitions { var nbScalaCallers: Int = 0 def newScalaCaller(delegateType: Type): Symbol = { assert(forMSIL, "scalaCallers can only be created if target is .NET") - // object: reference to object on which to call (scala-)metod + // object: reference to object on which to call (scala-)method val paramTypes: List[Type] = List(ObjectClass.tpe) val name: String = "$scalaCaller$$" + nbScalaCallers // tparam => resultType, which is the resultType of PolyType, i.e. the result type after applying the diff --git a/src/compiler/scala/tools/nsc/symtab/Positions.scala b/src/compiler/scala/tools/nsc/symtab/Positions.scala index 215a6217af..58b9164988 100644 --- a/src/compiler/scala/tools/nsc/symtab/Positions.scala +++ b/src/compiler/scala/tools/nsc/symtab/Positions.scala @@ -27,7 +27,7 @@ self: scala.tools.nsc.symtab.SymbolTable => /** Ensure that given tree has no positions that overlap with * any of the positions of `others`. This is done by - * shortening the range or assinging TransparentPositions + * shortening the range or assigning TransparentPositions * to some of the nodes in `tree`. */ def ensureNonOverlapping(tree: Tree, others: List[Tree]) {} diff --git a/src/compiler/scala/tools/nsc/symtab/Scopes.scala b/src/compiler/scala/tools/nsc/symtab/Scopes.scala index ca6c93bd1c..f305f20d2a 100644 --- a/src/compiler/scala/tools/nsc/symtab/Scopes.scala +++ b/src/compiler/scala/tools/nsc/symtab/Scopes.scala @@ -48,7 +48,7 @@ trait Scopes { var elems: ScopeEntry = initElems - /** The number of times this scope is neted in another + /** The number of times this scope is nested in another */ private var nestinglevel = 0 @@ -279,7 +279,7 @@ trait Scopes { * was nested in another */ def nestingLevel = nestinglevel - /** Return all symbols as an interator in the order they were entered in this scope. + /** Return all symbols as an iterator in the order they were entered in this scope. */ def iterator: Iterator[Symbol] = toList.iterator diff --git a/src/compiler/scala/tools/nsc/symtab/Symbols.scala b/src/compiler/scala/tools/nsc/symtab/Symbols.scala index a0ababea8a..f50ace8426 100644 --- a/src/compiler/scala/tools/nsc/symtab/Symbols.scala +++ b/src/compiler/scala/tools/nsc/symtab/Symbols.scala @@ -441,7 +441,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => final def isScalaPackageClass: Boolean = isPackageClass && owner.isRoot && name == nme.scala_.toTypeName || isPackageObjectClass && owner.isScalaPackageClass // not printed as a prefix - /** Is symbol a monomophic type? + /** Is symbol a monomorphic type? * assumption: if a type starts out as monomorphic, it will not acquire * type parameters in later phases. */ @@ -587,7 +587,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => /** A a member of class `base' is incomplete if * (1) it is declared deferred or * (2) it is abstract override and its super symbol in `base' is - * nonexistent or inclomplete. + * nonexistent or incomplete. * * @param base ... * @return ... @@ -1156,7 +1156,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => /** The directly or indirectly inherited mixins of this class * except for mixin classes inherited by the superclass. Mixin classes appear - * in linearlization order. + * in linearization order. */ def mixinClasses: List[Symbol] = { val sc = superClass @@ -1274,7 +1274,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => * Returns the rawInfo of the owner. If the current phase has flat classes, it first * applies all pending type maps to this symbol. * - * Asssume this is the ModuleSymbol for B in the follwing definition: + * assume this is the ModuleSymbol for B in the following definition: * package p { class A { object B { val x = 1 } } } * * The owner after flatten is "package p" (see "def owner"). The flatten type map enters @@ -1289,7 +1289,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => /** If this symbol is an implementation class, its interface, otherwise the symbol itself * The method follows two strategies to determine the interface. - * - during or after erasure, it takes the last parent of the implementatation class + * - during or after erasure, it takes the last parent of the implementation class * (which is always the interface, by convention) * - before erasure, it looks up the interface name in the scope of the owner of the class. * This only works for implementation classes owned by other classes or traits. @@ -1799,7 +1799,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => tpeCache } - // needed for experimentlal code for early types as type parameters + // needed for experimental code for early types as type parameters // def refreshType() { tpePeriod = NoPeriod } override def typeConstructor: Type = { @@ -2004,7 +2004,7 @@ trait Symbols extends reflect.generic.Symbols { self: SymbolTable => override def sourceModule_=(module: Symbol) { this.module = module } } - /** An object repreesenting a missing symbol */ + /** An object representing a missing symbol */ object NoSymbol extends Symbol(null, NoPosition, nme.NOSYMBOL) { setInfo(NoType) privateWithin = this diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index c91737ef92..4211392b88 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -202,7 +202,7 @@ trait Types extends reflect.generic.Types { self: SymbolTable => /** A proxy for a type (identified by field `underlying') that forwards most * operations to it. Every operation that is overridden for some kind of types is - * forwarded here. Some opererations are rewrapped again. + * forwarded here. Some operations are rewrapped again. */ trait RewrappingTypeProxy extends SimpleTypeProxy { protected def maybeRewrap(newtp: Type) = if (newtp eq underlying) this else rewrap(newtp) @@ -303,7 +303,7 @@ trait Types extends reflect.generic.Types { self: SymbolTable => def typeOfThis: Type = typeSymbol.typeOfThis /** Map to a singleton type which is a subtype of this type. - * todo: change to singleton type of an existentgially defined variable + * todo: change to singleton type of an existentially defined variable * of the right type instead of making this a `this` of a refined type. */ def narrow: Type = @@ -881,7 +881,7 @@ trait Types extends reflect.generic.Types { self: SymbolTable => } } - /** The existential skolems and existentially quantifed variables which are free in this type */ + /** The existential skolems and existentially quantified variables which are free in this type */ def existentialSkolems: List[Symbol] = { var boundSyms: List[Symbol] = List() var skolems: List[Symbol] = List() @@ -2140,7 +2140,7 @@ A type's typeSymbol should never be inspected directly. /** A class representing a type variable * Not used after phase `typer'. - * A higher-kinded type variable has type arguments (a list of Type's) and type paramers (list of Symbols) + * A higher-kinded type variable has type arguments (a list of Type's) and type parameters (list of Symbols) * A TypeVar whose list of args is non-empty can only be instantiated by a higher-kinded type that can be applied to these args * a typevar is much like a typeref, except it has special logic for type equality/subtyping */ @@ -2583,7 +2583,7 @@ A type's typeSymbol should never be inspected directly. * (minus any SingletonClass markers), * type variables in `tparams' occurring in contravariant positions are replaced by upper bounds, * provided the resulting type is legal wrt to stability, and does not contain any - * type varianble in `tparams'. + * type variable in `tparams'. * The abstraction drops all type parameters that are not directly or indirectly * referenced by type `tpe1'. * If there are no remaining type parameters, simply returns result type `tpe'. @@ -3723,7 +3723,7 @@ A type's typeSymbol should never be inspected directly. * let bt1, bt2 be the base types of tp1, tp2 relative to class bc * Then: * bt1 and bt2 have the same prefix, and - * any correspondiong non-variant type arguments of bt1 and bt2 are the same + * any corresponding non-variant type arguments of bt1 and bt2 are the same */ def isPopulated(tp1: Type, tp2: Type): Boolean = { def isConsistent(tp1: Type, tp2: Type): Boolean = (tp1, tp2) match { @@ -4922,7 +4922,7 @@ A type's typeSymbol should never be inspected directly. val GlbFailure = new Throwable /** A global counter for glb calls in the `specializes' query connected to the `addMembers' - * call in `glb'. There's a possible inifinite recursion when `specializes' calls + * call in `glb'. There's a possible infinite recursion when `specializes' calls * memberType, which calls baseTypeSeq, which calls mergePrefixAndArgs, which calls glb. * The counter breaks this recursion after two calls. * If the recursion is broken, no member is added to the glb. @@ -5051,7 +5051,7 @@ A type's typeSymbol should never be inspected directly. * of types `tps'. All types in `tps' are typerefs or singletypes * with the same symbol. * Return `Some(x)' if the computation succeeds with result `x'. - * Return `None' if the computuation fails. + * Return `None' if the computation fails. */ def mergePrefixAndArgs(tps: List[Type], variance: Int, depth: Int): Option[Type] = tps match { case List(tp) => diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala index b685fe1c2f..a139f605b0 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala @@ -77,7 +77,7 @@ object ClassfileConstants { final val CONSTANT_INTFMETHODREF = 11 final val CONSTANT_NAMEANDTYPE = 12 - // tags desribing the type of a literal in attribute values + // tags describing the type of a literal in attribute values final val BYTE_TAG = 'B' final val CHAR_TAG = 'C' final val DOUBLE_TAG = 'D' diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index 1453a2138d..3a8d93a7a7 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -704,7 +704,7 @@ abstract class ClassfileParser { while ('0' <= sig(index) && sig(index) <= '9') index += 1 var elemtp = sig2type(tparams, skiptvs) // make unbounded Array[T] where T is a type variable into Array[T with Object] - // (this is necessary because such arrays have a representation which is incompatibe + // (this is necessary because such arrays have a representation which is incompatible // with arrays of primitive types. if (elemtp.typeSymbol.isAbstractType && !(elemtp <:< definitions.ObjectClass.tpe)) elemtp = intersectionType(List(elemtp, definitions.ObjectClass.tpe)) @@ -836,7 +836,7 @@ abstract class ClassfileParser { case nme.AnnotationDefaultATTR => sym.addAnnotation(AnnotationInfo(definitions.AnnotationDefaultAttr.tpe, List(), List())) in.skip(attrLen) - // Java annotatinos on classes / methods / fields with RetentionPolicy.RUNTIME + // Java annotations on classes / methods / fields with RetentionPolicy.RUNTIME case nme.RuntimeAnnotationATTR => if (isScalaAnnot || !isScala) { val scalaSigAnnot = parseAnnotations(attrLen) @@ -1123,7 +1123,7 @@ abstract class ClassfileParser { val sym = classSymbol(outerName) val s = // if loading during initialization of `definitions' typerPhase is not yet set. - // in that case we simply load the mmeber at the current phase + // in that case we simply load the member at the current phase if (currentRun.typerPhase != null) atPhase(currentRun.typerPhase)(getMember(sym, innerName.toTypeName)) else diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala index 5bd3955604..92dfb3749a 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala @@ -135,7 +135,7 @@ abstract class ICodeReader extends ClassfileParser { res } - /** Checks if tp1 is the same type as tp2, modulo implict methods. + /** Checks if tp1 is the same type as tp2, modulo implicit methods. * We don't care about the distinction between implicit and explicit * methods as this point, and we can't get back the information from * bytecode anyway. diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala index 09756d0ef1..68d314bfe9 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala @@ -159,7 +159,7 @@ abstract class Pickler extends SubComponent { private def putSymbols(syms: List[Symbol]) = syms foreach putSymbol - /** Store type and everythig it refers to in map index. + /** Store type and everything it refers to in map index. * * @param tp ... */ diff --git a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala index 8cfa3926a3..92f117428a 100644 --- a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala +++ b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala @@ -116,7 +116,7 @@ abstract class AddInterfaces extends InfoTransform { *

* *

* The above methods are forwarded by subclass that1.isEmpty case _ => false @@ -595,7 +595,7 @@ object List extends SeqFactory[List] { * * @param arr the array to convert * @param start the first index to consider - * @param len the lenght of the range to convert + * @param len the length of the range to convert * @return a list that contains the same elements than `arr` * in the same order */ diff --git a/src/library/scala/collection/immutable/ListMap.scala b/src/library/scala/collection/immutable/ListMap.scala index 0f66a1f452..d8e3e0856b 100644 --- a/src/library/scala/collection/immutable/ListMap.scala +++ b/src/library/scala/collection/immutable/ListMap.scala @@ -30,7 +30,7 @@ object ListMap extends ImmutableMapFactory[ListMap] { * directly, or by applying the function ListMap.empty. * * @author Matthias Zenger - * @author Martin Oderskty + * @author Martin Odersky * @version 2.0, 01/01/2007 * @since 1 */ diff --git a/src/library/scala/collection/immutable/LongMap.scala b/src/library/scala/collection/immutable/LongMap.scala index 95ab40c5e2..0d74e41cec 100644 --- a/src/library/scala/collection/immutable/LongMap.scala +++ b/src/library/scala/collection/immutable/LongMap.scala @@ -346,7 +346,7 @@ sealed abstract class LongMap[+T] extends Map[Long, T] with MapLike[Long, T, Lon } /** - * Forms the intersection of these two maps with a combinining function. The resulting map is + * Forms the intersection of these two maps with a combining function. The resulting map is * a map that has only keys present in both maps and has values produced from the original mappings * by combining them with f. * diff --git a/src/library/scala/collection/immutable/PagedSeq.scala b/src/library/scala/collection/immutable/PagedSeq.scala index bde8d67ffe..bd12502520 100644 --- a/src/library/scala/collection/immutable/PagedSeq.scala +++ b/src/library/scala/collection/immutable/PagedSeq.scala @@ -202,7 +202,7 @@ private class Page[T: ClassManifest](val num: Int) { /** The next page in the sequence */ var next : Page[T] = null - /** A later page in the sequence, serves a cachae for pointing to last page */ + /** A later page in the sequence, serves a cache for pointing to last page */ var later : Page[T] = this /** The number of characters read into this page */ @@ -218,11 +218,11 @@ private class Page[T: ClassManifest](val num: Int) { /** The index of the first character in this page relative to the whole sequence */ final def start = num * PageSize - /** The index of the character following the last charcater in this page relative + /** The index of the character following the last character in this page relative * to the whole sequence */ final def end = start + filled - /** The currently last page in the sequence; might change as more charcaters are appended */ + /** The currently last page in the sequence; might change as more characters are appended */ final def latest: Page[T] = { if (later.next != null) later = later.next.latest later diff --git a/src/library/scala/collection/mutable/ArrayBuffer.scala b/src/library/scala/collection/mutable/ArrayBuffer.scala index 85eb83ac1f..0c6aa9ce0c 100644 --- a/src/library/scala/collection/mutable/ArrayBuffer.scala +++ b/src/library/scala/collection/mutable/ArrayBuffer.scala @@ -65,7 +65,7 @@ class ArrayBuffer[A](override protected val initialSize: Int) * via its iterator method. The identity of the * buffer is returned. * - * @param iter the iterfable object. + * @param iter the iterable object. * @return the updated buffer. */ override def ++=(xs: TraversableOnce[A]): this.type = xs match { @@ -125,7 +125,7 @@ class ArrayBuffer[A](override protected val initialSize: Int) * the buffer size. * * @param n the index which refers to the first element to delete. - * @param count the number of elemenets to delete + * @param count the number of elements to delete * @throws Predef.IndexOutOfBoundsException if n is out of bounds. */ override def remove(n: Int, count: Int) { diff --git a/src/library/scala/collection/mutable/FlatHashTable.scala b/src/library/scala/collection/mutable/FlatHashTable.scala index b5094bc098..ea4033d405 100644 --- a/src/library/scala/collection/mutable/FlatHashTable.scala +++ b/src/library/scala/collection/mutable/FlatHashTable.scala @@ -46,7 +46,7 @@ trait FlatHashTable[A] { private def initialCapacity = capacity(initialSize) /** - * Initialises the collection from the input stream. `f` will be called for each element + * Initializes the collection from the input stream. `f` will be called for each element * read from the input stream in the order determined by the stream. This is useful for * structures where iteration order is important (e.g. LinkedHashSet). * diff --git a/src/library/scala/collection/mutable/GrowingBuilder.scala b/src/library/scala/collection/mutable/GrowingBuilder.scala index 259df9a434..445e9d4f3e 100644 --- a/src/library/scala/collection/mutable/GrowingBuilder.scala +++ b/src/library/scala/collection/mutable/GrowingBuilder.scala @@ -16,7 +16,7 @@ import generic._ * almost identical to AddingBuilder, but necessitated by the existence of * classes which are Growable but not Addable, which is a result of covariance * interacting surprisingly with any2stringadd thus driving '+' out of the Seq - * hierachy. The tendrils of original sin should never be underestimated. + * hierarchy. The tendrils of original sin should never be underestimated. * * @author Paul Phillips * @version 2.8 diff --git a/src/library/scala/collection/mutable/HashTable.scala b/src/library/scala/collection/mutable/HashTable.scala index aa7993ed14..14f1720a4c 100644 --- a/src/library/scala/collection/mutable/HashTable.scala +++ b/src/library/scala/collection/mutable/HashTable.scala @@ -65,7 +65,7 @@ trait HashTable[A] { private def initialCapacity = capacity(initialSize) /** - * Initialises the collection from the input stream. `f` will be called for each key/value pair + * Initializes the collection from the input stream. `f` will be called for each key/value pair * read from the input stream in the order determined by the stream. This is useful for * structures where iteration order is important (e.g. LinkedHashMap). */ diff --git a/src/library/scala/collection/mutable/MapLike.scala b/src/library/scala/collection/mutable/MapLike.scala index eca102e502..9c3c1c0e5f 100644 --- a/src/library/scala/collection/mutable/MapLike.scala +++ b/src/library/scala/collection/mutable/MapLike.scala @@ -42,7 +42,7 @@ import annotation.migration * {{{ * def> empty: This * }}} - * If you wish to avoid the unncessary construction of an `Option` + * If you wish to avoid the unnecessary construction of an `Option` * object, you could also override `apply`, `update`, * and `delete`. @@ -102,7 +102,7 @@ trait MapLike[A, B, +This <: MapLike[A, B, This] with Map[A, B]] def += (kv: (A, B)): this.type /** Creates a new map consisting of all key/value pairs of the current map - * plus a new pair of a guven key and value. + * plus a new pair of a given key and value. * * @param key The key to add * @param value The new value @@ -192,7 +192,7 @@ trait MapLike[A, B, +This <: MapLike[A, B, This] with Map[A, B]] * in map and returns that value. * @param key the key to test * @param op the computation yielding the value to associate with `key`, if - * `key` is previosuly unbound. + * `key` is previously unbound. * @return the value associated with key (either previously or as a result * of executing the method). */ @@ -204,7 +204,7 @@ trait MapLike[A, B, +This <: MapLike[A, B, This] with Map[A, B]] /** Applies a transformation function to all values contained in this map. * The transformation function produces new values from existing keys - * asssociated values. + * associated values. * * @param f the transformation to apply * @return the map itself. diff --git a/src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala b/src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala index 61cb0a1331..9d18846252 100644 --- a/src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala +++ b/src/library/scala/collection/mutable/SynchronizedPriorityQueue.scala @@ -75,7 +75,7 @@ class SynchronizedPriorityQueue[A](implicit ord: Ordering[A]) extends PriorityQu */ override def clear(): Unit = synchronized { super.clear } - /** Returns an iterator which yiels all the elements of the priority + /** Returns an iterator which yield all the elements of the priority * queue in descending priority order. * * @return an iterator over all elements sorted in descending order. diff --git a/src/library/scala/math/BigInt.scala b/src/library/scala/math/BigInt.scala index 4c9f970cb4..5267ad8b95 100644 --- a/src/library/scala/math/BigInt.scala +++ b/src/library/scala/math/BigInt.scala @@ -102,7 +102,7 @@ object BigInt { */ implicit def int2bigInt(i: Int): BigInt = apply(i) - /** Implicit copnversion from long to BigInt + /** Implicit conversion from long to BigInt */ implicit def long2bigInt(l: Long): BigInt = apply(l) } diff --git a/src/library/scala/reflect/generic/StdNames.scala b/src/library/scala/reflect/generic/StdNames.scala index 7f48b5bf62..7a3b9169d8 100755 --- a/src/library/scala/reflect/generic/StdNames.scala +++ b/src/library/scala/reflect/generic/StdNames.scala @@ -18,7 +18,7 @@ trait StdNames { self: Universe => val ROOTPKG = newTermName("_root_") val EMPTY = newTermName("") - /** The expanded name of `name' relative to this class `base` with given `seperator` + /** The expanded name of `name' relative to this class `base` with given `separator` */ def expandedName(name: Name, base: Symbol, separator: String = EXPAND_SEPARATOR_STRING): Name = newTermName(base.fullName('$') + separator + name) diff --git a/src/library/scala/reflect/generic/Symbols.scala b/src/library/scala/reflect/generic/Symbols.scala index b956f93569..2f5e0624ab 100755 --- a/src/library/scala/reflect/generic/Symbols.scala +++ b/src/library/scala/reflect/generic/Symbols.scala @@ -102,7 +102,7 @@ trait Symbols { self: Universe => */ def sourceModule: Symbol = NoSymbol - /** If symbol is an object defition, it's implied associated class, + /** If symbol is an object definition, it's implied associated class, * otherwise NoSymbol */ def moduleClass: Symbol diff --git a/src/library/scala/reflect/generic/Trees.scala b/src/library/scala/reflect/generic/Trees.scala index db3a19a843..df93d157e3 100755 --- a/src/library/scala/reflect/generic/Trees.scala +++ b/src/library/scala/reflect/generic/Trees.scala @@ -296,13 +296,13 @@ trait Trees { self: Universe => extends TermTree /** Case clause in a pattern match, eliminated by TransMatch - * (except for occurences in switch statements) + * (except for occurrences in switch statements) */ case class CaseDef(pat: Tree, guard: Tree, body: Tree) extends Tree /** Alternatives of patterns, eliminated by TransMatch, except for - * occurences in encoded Switch stmt (=remaining Match(CaseDef(...)) + * occurrences in encoded Switch stmt (=remaining Match(CaseDef(...)) */ case class Alternative(trees: List[Tree]) extends TermTree diff --git a/src/library/scala/reflect/generic/Types.scala b/src/library/scala/reflect/generic/Types.scala index a42e79a3fe..17e19715d7 100755 --- a/src/library/scala/reflect/generic/Types.scala +++ b/src/library/scala/reflect/generic/Types.scala @@ -29,7 +29,7 @@ trait Types { self: Universe => tostringRecursions -= 1 } - /** Metod to be implemented in subclasses. + /** Method to be implemented in subclasses. * Converts this type to a string in calling toString for its parts. */ def safeToString: String = super.toString diff --git a/src/library/scala/reflect/generic/UnPickler.scala b/src/library/scala/reflect/generic/UnPickler.scala index d0fff42d56..d7eef770cc 100755 --- a/src/library/scala/reflect/generic/UnPickler.scala +++ b/src/library/scala/reflect/generic/UnPickler.scala @@ -27,8 +27,8 @@ abstract class UnPickler { * from an array of bytes. * @param bytes bytearray from which we unpickle * @param offset offset from which unpickling starts - * @param classroot the top-level class which is unpickled, or NoSymbol if unapplicable - * @param moduleroot the top-level module which is unpickled, or NoSymbol if unapplicable + * @param classroot the top-level class which is unpickled, or NoSymbol if inapplicable + * @param moduleroot the top-level module which is unpickled, or NoSymbol if inapplicable * @param filename filename associated with bytearray, only used for error messages */ def unpickle(bytes: Array[Byte], offset: Int, classRoot: Symbol, moduleRoot: Symbol, filename: String) { diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index 43d60f2383..2970cf1980 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -90,7 +90,7 @@ object ScalaRunTime { } /** Convert a numeric value array to an object array. - * Needed to deal with vararg arguments of primtive types that are passed + * Needed to deal with vararg arguments of primitive types that are passed * to a generic Java vararg parameter T ... */ def toObjectArray(src: AnyRef): Array[Object] = { diff --git a/src/library/scala/util/automata/SubsetConstruction.scala b/src/library/scala/util/automata/SubsetConstruction.scala index 0ebdd160e7..c8fba39f0e 100644 --- a/src/library/scala/util/automata/SubsetConstruction.scala +++ b/src/library/scala/util/automata/SubsetConstruction.scala @@ -57,7 +57,7 @@ class SubsetConstruction[T <: AnyRef](val nfa: NondetWordAutom[T]) { invIndexMap = invIndexMap.updated(ix, P) ix += 1 - // make transitiion map + // make transition map val Pdelta = new mutable.HashMap[T, BitSet] delta.update(P, Pdelta) diff --git a/src/library/scala/util/automata/WordBerrySethi.scala b/src/library/scala/util/automata/WordBerrySethi.scala index d3238b6f67..b54fdc53f2 100644 --- a/src/library/scala/util/automata/WordBerrySethi.scala +++ b/src/library/scala/util/automata/WordBerrySethi.scala @@ -81,7 +81,7 @@ abstract class WordBerrySethi extends BaseBerrySethi { this.labels += label } - // overriden in BindingBerrySethi + // overridden in BindingBerrySethi protected def seenLabel(r: RegExp, label: lang._labelT): Int = { pos += 1 seenLabel(r, pos, label) diff --git a/src/library/scala/util/matching/Regex.scala b/src/library/scala/util/matching/Regex.scala index 9e101eb0b8..1384dfa47c 100644 --- a/src/library/scala/util/matching/Regex.scala +++ b/src/library/scala/util/matching/Regex.scala @@ -253,7 +253,7 @@ object Regex { } - /** A case class for a succesful match. + /** A case class for a successful match. */ class Match(val source: java.lang.CharSequence, matcher: Matcher, diff --git a/src/library/scala/util/parsing/combinator/Parsers.scala b/src/library/scala/util/parsing/combinator/Parsers.scala index ee26c7ae71..d270757189 100644 --- a/src/library/scala/util/parsing/combinator/Parsers.scala +++ b/src/library/scala/util/parsing/combinator/Parsers.scala @@ -288,7 +288,7 @@ trait Parsers { * characters accepts.

* * @param q a parser that accepts if p consumes less characters. - * @return a `Parser' that returns the result of the parser consuming the most characteres (out of `p' and `q'). + * @return a `Parser' that returns the result of the parser consuming the most characters (out of `p' and `q'). */ def ||| [U >: T](q: => Parser[U]): Parser[U] = new Parser[U] { def apply(in: Input) = { @@ -348,7 +348,7 @@ trait Parsers { def ^? [U](f: PartialFunction[T, U]): Parser[U] = ^?(f, r => "Constructor function not defined at "+r) - /** A parser combinator that parameterises a subsequent parser with the result of this one + /** A parser combinator that parameterizes a subsequent parser with the result of this one * *

* Use this combinator when a parser depends on the result of a previous parser. `p' should be @@ -662,7 +662,7 @@ trait Parsers { /** A parser generator that generalises the rep1sep generator so that `q', which parses the separator, * produces a right-associative function that combines the elements it separates. Additionally, - * The right-most (last) element and the left-most combinating function have to be supplied. + * The right-most (last) element and the left-most combining function have to be supplied. * * rep1sep(p: Parser[T], q) corresponds to chainr1(p, q ^^ cons, cons, Nil) (where val cons = (x: T, y: List[T]) => x :: y) * diff --git a/src/library/scala/xml/dtd/Decl.scala b/src/library/scala/xml/dtd/Decl.scala index ddc179b69f..2ac3d42a67 100644 --- a/src/library/scala/xml/dtd/Decl.scala +++ b/src/library/scala/xml/dtd/Decl.scala @@ -110,7 +110,7 @@ case class IntDef(value:String) extends EntityDef { val n = tmp.substring(ix, iz); if( !Utility.isName( n )) - throw new IllegalArgumentException("interal entity def: \""+n+"\" must be an XML Name"); + throw new IllegalArgumentException("internal entity def: \""+n+"\" must be an XML Name"); tmp = tmp.substring(iz+1, tmp.length()); ix = tmp.indexOf('%'); diff --git a/src/library/scala/xml/include/sax/Main.scala b/src/library/scala/xml/include/sax/Main.scala index 3aa281451c..60031b4b6a 100644 --- a/src/library/scala/xml/include/sax/Main.scala +++ b/src/library/scala/xml/include/sax/Main.scala @@ -26,7 +26,7 @@ object Main { *

* * @param args contains the URLs and/or filenames - * of the documents to be procesed. + * of the documents to be processed. */ def main(args: Array[String]) { def saxe[T](body: => T) = catching[T](classOf[SAXException]) opt body diff --git a/src/library/scala/xml/parsing/DefaultMarkupHandler.scala b/src/library/scala/xml/parsing/DefaultMarkupHandler.scala index 69c59c30cf..0a8bd7c4d6 100644 --- a/src/library/scala/xml/parsing/DefaultMarkupHandler.scala +++ b/src/library/scala/xml/parsing/DefaultMarkupHandler.scala @@ -13,7 +13,7 @@ package scala.xml package parsing -/** default implemenation of markup handler always returns NodeSeq.Empty */ +/** default implementation of markup handler always returns NodeSeq.Empty */ abstract class DefaultMarkupHandler extends MarkupHandler { def elem(pos: Int, pre: String, label: String, attrs: MetaData, diff --git a/src/library/scala/xml/parsing/MarkupHandler.scala b/src/library/scala/xml/parsing/MarkupHandler.scala index 75c7958c38..bcb0e03a07 100644 --- a/src/library/scala/xml/parsing/MarkupHandler.scala +++ b/src/library/scala/xml/parsing/MarkupHandler.scala @@ -70,7 +70,7 @@ abstract class MarkupHandler extends Logged */ def elemEnd(pos: Int, pre: String, label: String): Unit = () - /** callback method invoked by MarkupParser after parsing an elementm, + /** callback method invoked by MarkupParser after parsing an element, * between the elemStart and elemEnd callbacks * * @param pos the position in the source file diff --git a/src/library/scala/xml/parsing/MarkupParser.scala b/src/library/scala/xml/parsing/MarkupParser.scala index 38ae4a47fb..24e0d78c6f 100644 --- a/src/library/scala/xml/parsing/MarkupParser.scala +++ b/src/library/scala/xml/parsing/MarkupParser.scala @@ -208,7 +208,7 @@ trait MarkupParser extends MarkupParserCommon with TokenTests case _:ProcInstr => ; case _:Comment => ; case _:EntityRef => // todo: fix entities, shouldn't be "special" - reportSyntaxError("no entity references alllowed here"); + reportSyntaxError("no entity references allowed here"); case s:SpecialNode => if (s.toString().trim().length > 0) //non-empty text nodes not allowed elemCount = elemCount + 2; diff --git a/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java b/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java index b136f9423e..0a9ef6929e 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java +++ b/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java @@ -55,7 +55,7 @@ public class Attribute { return value; } - /**@return an array with the arguments to the attribute's contructor. */ + /**@return an array with the arguments to the attribute's constructor. */ public Object[] getConstructorArguments() { parseBlob(); Object[] cas = new Object[constrArgs.length]; diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala index 4644cade72..0e0e337ceb 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala @@ -20,7 +20,7 @@ import ch.epfl.lamp.compiler.msil._ import ch.epfl.lamp.compiler.msil.util.Table /** - * The MSIL printer Vistor. It prints a complete + * The MSIL printer Visitor. It prints a complete * assembly in a single or multiple files. Then this file can be compiled by ilasm. * * @author Nikolay Mihaylov diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala index eb86c96de5..a1c5091547 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala @@ -40,7 +40,7 @@ class MethodBuilder(name: String, declType: Type, attrs: Int, returnType: Type, def GetILGenerator(): ILGenerator = { if (ilGenerator == null) throw new RuntimeException - ("No code generator avaiable for this method: " + this) + ("No code generator available for this method: " + this) return ilGenerator } diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala index 63776cc084..b1b6d41eb5 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala @@ -20,8 +20,8 @@ import ch.epfl.lamp.compiler.msil.emit import ch.epfl.lamp.compiler.msil.util.Table /** - * The MSIL printer Vistor. It prints a complete - * assembly into seperate files. Then these files can be compiled by ilasm. + * The MSIL printer Visitor. It prints a complete + * assembly into separate files. Then these files can be compiled by ilasm. * * @author Nikolay Mihaylov * @author Daniel Lorch 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 1bd8e48633..835bdcadd0 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala @@ -1139,7 +1139,7 @@ object OpCode { opcode(Rem_Un, CEE_REM_UN, "rem.un" , 0xFFFFFF5E, POP_1_1, PUSH_1 , INLINE_NONE, FLOW_NEXT) /** - * Computes the bitwise AND of two values and pushes the result onto the evalution stack. + * Computes the bitwise AND of two values and pushes the result onto the evaluation stack. */ final val And = new OpCode() opcode(And, CEE_AND, "and" , 0xFFFFFF5F, POP_1_1, PUSH_1 , INLINE_NONE, FLOW_NEXT) @@ -1585,7 +1585,7 @@ object OpCode { opcode(Conv_Ovf_I2, CEE_CONV_OVF_I2, "conv.ovf.i2", 0xFFFFFFB5, POP_1, PUSH_I , INLINE_NONE , FLOW_NEXT) /** - * Converts the signed value on top of the sevaluation tack to signed int32, + * Converts the signed value on top of the evaluation stack to signed int32, * throwing OverflowException on overflow. */ final val Conv_Ovf_I4 = 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 f8e0f140a8..557b022f54 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala @@ -521,7 +521,7 @@ object OpCodes { final val Rem_Un = OpCode.Rem_Un /** - * Computes the bitwise AND of two values and pushes the result onto the evalution stack. + * Computes the bitwise AND of two values and pushes the result onto the evaluation stack. */ final val And = OpCode.And @@ -899,7 +899,7 @@ object OpCodes { final val Conv_Ovf_I2 = OpCode.Conv_Ovf_I2 /** - * Converts the signed value on top of the sevaluation tack to signed int32, + * Converts the signed value on top of the evaluation stack to signed int32, * throwing OverflowException on overflow. */ final val Conv_Ovf_I4 = OpCode.Conv_Ovf_I4 diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala index 5ebc5ea32f..7a880f2ac6 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala @@ -19,7 +19,7 @@ import ch.epfl.lamp.compiler.msil.emit import ch.epfl.lamp.compiler.msil.util.Table /** - * The MSIL printer Vistor. It prints a complete + * The MSIL printer Visitor. It prints a complete * assembly in a single file. Then this file can be compiled by ilasm. * * @author Nikolay Mihaylov diff --git a/src/scalap/scala/tools/scalap/scalax/rules/Functors.scala b/src/scalap/scala/tools/scalap/scalax/rules/Functors.scala index aa95b48d44..aa852c1e63 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/Functors.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/Functors.scala @@ -60,7 +60,7 @@ trait Functors { } } -/** One of the 'unit' definitions must be overriden in concrete subclasses */ +/** One of the 'unit' definitions must be overridden in concrete subclasses */ trait UnitFunctors extends Units with Functors { def unit : M[Unit] = unit(()) def unit[A](a : => A) : M[A] = unit map { Unit => a } @@ -73,7 +73,7 @@ trait Monoidals extends UnitFunctors { implicit def app[A, B](fab : M[A => B]) = (fa : M[A]) => fa applyTo fab implicit def appUnit[A, B](a2b : A => B) = app(unit(a2b)) - /** One of 'and' and 'applyTo' definitions must be overriden in concrete subclasses */ + /** One of 'and' and 'applyTo' definitions must be overridden in concrete subclasses */ trait Monoidal[+A] extends Functor[A] { self : M[A] => def and[B](fb : => M[B]) : M[(A, B)] = ((a : A) => (b : B) => (a, b))(this)(fb) def applyTo[B](fab : M[A => B]) : M[B] = fab and this map { case (f, a) => f(a) } diff --git a/src/scalap/scala/tools/scalap/scalax/rules/Rules.scala b/src/scalap/scala/tools/scalap/scalax/rules/Rules.scala index 4e8ddc8dbe..43f9c20b1d 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/Rules.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/Rules.scala @@ -98,7 +98,7 @@ trait StateRules { def nil = unit(Nil) def none = unit(None) - /** Create a rule that suceeds if f(in) is true. */ + /** Create a rule that identities if f(in) is true. */ def cond(f : S => Boolean) = get filter f /** Create a rule that succeeds if all of the given rules succeed. diff --git a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala index 31bbfa16af..26b01634f5 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala @@ -205,7 +205,7 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) { case _ => "^___^" }) - // Printe parameter clauses + // Print parameter clauses print(paramEntries.mkString( "(" + (mt match {case _: ImplicitMethodType => "implicit "; case _ => ""}) , ", ", ")")) @@ -261,7 +261,7 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) { val nn = processName(name) print(nn) printMethodType(m.infoType, true)( - {if (!m.isDeferred) print(" = { /* compiled code */ }" /* Print body only for non-abstract metods */ )} + {if (!m.isDeferred) print(" = { /* compiled code */ }" /* Print body only for non-abstract methods */ )} ) } print("\n") diff --git a/src/swing/scala/swing/SimpleGUIApplication.scala b/src/swing/scala/swing/SimpleGUIApplication.scala index 79eb3cd2b4..e26a0263f8 100644 --- a/src/swing/scala/swing/SimpleGUIApplication.scala +++ b/src/swing/scala/swing/SimpleGUIApplication.scala @@ -15,12 +15,12 @@ import javax.swing._ /** * Extend this class for most simple UI applications. Clients need to implement the - * top method. Framework intialization is done by this class. + * top method. Framework initialization is done by this class. * * In order to conform to Swing's threading policy, never implement top or any additional * member that created Swing components as a value unless component creation happens on * the EDT (see Swing.onEDT and Swing.onEDTWait). Lazy values are okay for the same reason - * if they are intialized on the EDT always. + * if they are initialized on the EDT always. */ @deprecated("Use SimpleSwingApplication instead") abstract class SimpleGUIApplication extends GUIApplication { diff --git a/src/swing/scala/swing/event/TableEvent.scala b/src/swing/scala/swing/event/TableEvent.scala index 9e5a05629b..e12322fa18 100644 --- a/src/swing/scala/swing/event/TableEvent.scala +++ b/src/swing/scala/swing/event/TableEvent.scala @@ -18,7 +18,7 @@ abstract class TableChange(override val source: Table) extends TableEvent(source /** * The most general table change. The table might have changed completely, - * i.e., comlumns might have been reordered, rows added or removed, etc. + * i.e., columns might have been reordered, rows added or removed, etc. * No other event indicates that the structure might have changed. */ case class TableStructureChanged(override val source: Table) extends TableChange(source) diff --git a/test/files/buildmanager/t2556_3/t2556_3.check b/test/files/buildmanager/t2556_3/t2556_3.check index c59e4fe09d..af0c63eebc 100644 --- a/test/files/buildmanager/t2556_3/t2556_3.check +++ b/test/files/buildmanager/t2556_3/t2556_3.check @@ -5,7 +5,7 @@ builder > A.scala compiling Set(A.scala) Changes: Map(class A -> List(), class B -> List(Changed(Class(B))[List((A,java.lang.Object), (ScalaObject,ScalaObject))])) invalidate C.scala because parents have changed [Changed(Class(B))[List((A,java.lang.Object), (ScalaObject,ScalaObject))]] -invalidate B.scala because it references invalid (no longer inherited) defintion [ParentChanged(Class(C))] +invalidate B.scala because it references invalid (no longer inherited) definition [ParentChanged(Class(C))] compiling Set(B.scala, C.scala) B.scala:3: error: type mismatch; found : C diff --git a/test/files/neg/t0528neg.scala b/test/files/neg/t0528neg.scala index 911745b763..30d20c95b1 100644 --- a/test/files/neg/t0528neg.scala +++ b/test/files/neg/t0528neg.scala @@ -3,7 +3,7 @@ trait Sequ[+A] { } class RichStr extends Sequ[Char] { - // override to a primitve array + // override to a primitive array def toArray: Array[Char] = new Array[Char](10) } diff --git a/test/files/pos/spec-List.scala b/test/files/pos/spec-List.scala index e49391f0e4..c5bc3aa5fd 100644 --- a/test/files/pos/spec-List.scala +++ b/test/files/pos/spec-List.scala @@ -648,7 +648,7 @@ object List extends SeqFactory[List] { * * @param arr the array to convert * @param start the first index to consider - * @param len the lenght of the range to convert + * @param len the length of the range to convert * @return a list that contains the same elements than arr * in the same order */ diff --git a/test/files/pos/t1164.scala b/test/files/pos/t1164.scala index b238bf54d9..ca780c9a26 100644 --- a/test/files/pos/t1164.scala +++ b/test/files/pos/t1164.scala @@ -12,7 +12,7 @@ object test { def matchAndGetArgFromFoo[a]( e:Foo[a]):a = {e match { case Foo(x) => x }} - // Try the same thing as above but use function as arguemnt to Bar + // Try the same thing as above but use function as argument to Bar // constructor type FunIntToA [a] = (Int) => a diff --git a/test/files/pos/t1756.scala b/test/files/pos/t1756.scala index 4f7202114c..d5d3ddc624 100755 --- a/test/files/pos/t1756.scala +++ b/test/files/pos/t1756.scala @@ -15,7 +15,7 @@ expected type from x+, because the lhs x is still typed as a Poly[A]. This means that the argument of the implicit conversion is typechecked with expected type A with Poly[A]. And no solution is found. -To solve this, I added a fallback scheme similar to implicit arguents: +To solve this, I added a fallback scheme similar to implicit arguments: When an implicit view that adds a method matching given arguments and result type fails, try again without the result type. */ diff --git a/test/files/run/t0528.scala b/test/files/run/t0528.scala index 5a4755c947..df6d13a17a 100644 --- a/test/files/run/t0528.scala +++ b/test/files/run/t0528.scala @@ -3,7 +3,7 @@ trait Sequ[A] { } class RichStr extends Sequ[Char] { - // override to a primitve array + // override to a primitive array def toArray: Array[Char] = Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9') } diff --git a/test/files/run/t2526.scala b/test/files/run/t2526.scala index 235aca234d..53f3059135 100644 --- a/test/files/run/t2526.scala +++ b/test/files/run/t2526.scala @@ -38,7 +38,7 @@ object Test { /* * Checks foreach of `actual` goes over all the elements in `expected` - * We duplicate the method above because there is no common inteface between Traverable and + * We duplicate the method above because there is no common inteface between Traversable and * Iterator and we want to avoid converting between collections to ensure that we test what * we mean to test. */ diff --git a/test/pending/pos/t0644.scala b/test/pending/pos/t0644.scala deleted file mode 100644 index 5ad12c3632..0000000000 --- a/test/pending/pos/t0644.scala +++ /dev/null @@ -1,11 +0,0 @@ -class A { - def appply(): Int = 0 - def update(n: Int) {} -} - -class B extends A { - this() - this()=1 - super() - super()=1 -} -- cgit v1.2.3