diff options
Diffstat (limited to 'src')
120 files changed, 225 insertions, 228 deletions
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 <code>iold</code> with <code>is</code>. 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 = <body> - <h1>Page source is not implmented yet</h1> + <h1>Page source is not implemented yet</h1> </body> /* 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). * </p> * <p> - * Annotations are pickled (written to scala symbtab attribute + * Annotations are pickled (written to scala symtab attribute * in the classfile) if <code>atp</code> inherits form * <code>StaticAnnotation</code>. * </p> 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 <code>index</code>. + /** Store type and everything it refers to in map <code>index</code>. * * @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 { * </p> * <ul> * <li> - * for every interface member of <code>iface</code> its implemention + * for every interface member of <code>iface</code> its implementation * method, if one is needed. * </li> * <li> diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala index dc7f62565b..e6811cf497 100644 --- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala +++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala @@ -93,7 +93,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL { * - The type-checker has prevented dynamic applies on methods which * parameter's erased types are not statically known at the call site. * This is necessary to allow dispatching the call to the correct - * method (dispatching on paramters is static in Scala). In practice, + * method (dispatching on parameters is static in Scala). In practice, * this limitation only arises when the called method is defined as a * refinement, where the refinement defines a parameter based on a * type variable. */ @@ -457,7 +457,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL { /* This creates the tree that does the reflective call (see general comment * on the apply-dynamic tree for its format). This tree is simply composed - * of three succesive calls, first to getClass on the callee, then to + * of three successive calls, first to getClass on the callee, then to * getMethod on the class, then to invoke on the method. * - getMethod needs an array of classes for choosing one amongst many * overloaded versions of the method. This is provided by paramTypeClasses @@ -641,7 +641,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL { /* Returns the symbol and the tree for the symbol field interning a reference to a symbol 'synmname'. * If it doesn't exist, i.e. the symbol is encountered the first time, - * it creates a new static field definition and initalization and returns it. + * it creates a new static field definition and initialization and returns it. */ private def getSymbolStaticField(pos: Position, symname: String, rhs: Tree, tree: Tree): (Symbol, Tree, Tree) = symbolStaticFields.getOrElseUpdate(symname, { diff --git a/src/compiler/scala/tools/nsc/transform/Constructors.scala b/src/compiler/scala/tools/nsc/transform/Constructors.scala index 9bb7200502..7169516560 100644 --- a/src/compiler/scala/tools/nsc/transform/Constructors.scala +++ b/src/compiler/scala/tools/nsc/transform/Constructors.scala @@ -217,7 +217,7 @@ abstract class Constructors extends Transform with ast.TreeDSL { // Could symbol's definition be omitted, provided it is not accessed? // This is the case if the symbol is defined in the current class, and // ( the symbol is an object private parameter accessor field, or - // the symbol is an outer accessor of a final class which does not override another outer accesser. ) + // the symbol is an outer accessor of a final class which does not override another outer accessor. ) def maybeOmittable(sym: Symbol) = (sym.owner == clazz && ((sym hasFlag PARAMACCESSOR) && sym.isPrivateLocal || diff --git a/src/compiler/scala/tools/nsc/transform/Erasure.scala b/src/compiler/scala/tools/nsc/transform/Erasure.scala index feb21ec75e..ea759b30f5 100644 --- a/src/compiler/scala/tools/nsc/transform/Erasure.scala +++ b/src/compiler/scala/tools/nsc/transform/Erasure.scala @@ -18,7 +18,7 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer with ast. { import global._ // the global environment import definitions._ // standard classes and methods - // @S: XXX: why is this here? earsure is a typer, if you comment this + // @S: XXX: why is this here? erasure is a typer, if you comment this // out erasure still works, uses its own typed methods. lazy val typerXXX = this.typer import typerXXX.{typed} // methods to type trees @@ -749,7 +749,7 @@ abstract class Erasure extends AddInterfaces with typechecker.Analyzer with ast. val opc = new overridingPairs.Cursor(root) { override def exclude(sym: Symbol): Boolean = (!sym.isTerm || sym.hasFlag(PRIVATE) || super.exclude(sym) - // specialized members have no type history before 'specialize', causing duble def errors for curried defs + // specialized members have no type history before 'specialize', causing double def errors for curried defs || !sym.hasTypeAt(currentRun.refchecksPhase.id)) override def matches(sym1: Symbol, sym2: Symbol): Boolean = diff --git a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala index ed8a827e88..dad654c967 100644 --- a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala +++ b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala @@ -84,7 +84,7 @@ abstract class ExplicitOuter extends InfoTransform * <p> * Add an outer accessor <code>$outer$$C</code> to every inner class * with fully qualified name <code>C</code> that is not an interface. - * The outer accesssor is abstract for traits, concrete for other + * The outer accessor is abstract for traits, concrete for other * classes. * </p> * <p> diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala index 179cf8211a..b24b263b7a 100644 --- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala +++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala @@ -150,7 +150,7 @@ abstract class LambdaLift extends InfoTransform { // The param symbol in the MethodType should not be renamed, only the symbol in scope. This way, // parameter names for named arguments are not changed. Example: without cloning the MethodType, // def closure(x: Int) = { () => x } - // would have the signatrue + // would have the signature // closure: (x$1: Int)() => Int if (sym.hasFlag(PARAM) && sym.owner.info.paramss.exists(_.contains(sym))) sym.owner.setInfo(sym.owner.info.cloneInfo(sym.owner)) diff --git a/src/compiler/scala/tools/nsc/transform/LazyVals.scala b/src/compiler/scala/tools/nsc/transform/LazyVals.scala index 23dda60f87..4cadc66af1 100644 --- a/src/compiler/scala/tools/nsc/transform/LazyVals.scala +++ b/src/compiler/scala/tools/nsc/transform/LazyVals.scala @@ -125,7 +125,7 @@ abstract class LazyVals extends Transform with ast.TreeDSL { * } * where bitmap$n is an int value acting as a bitmap of initialized values. It is * the 'n' is (offset / 32), the MASK is (1 << (offset % 32)). If the value has type - * unit, no field is used to chache the value, so the resulting code is: + * unit, no field is used to cache the value, so the resulting code is: * { * if ((bitmap$n & MASK) == 0) { * <rhs>; diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala index ea324799b4..85f71cabc9 100644 --- a/src/compiler/scala/tools/nsc/transform/Mixin.scala +++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala @@ -19,7 +19,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL { /** The name of the phase: */ val phaseName: String = "mixin" - /** The phase might set the fiollowing new flags: */ + /** The phase might set the following new flags: */ override def phaseNewFlags: Long = lateMODULE | notABSTRACT /** This map contains a binding (class -> info) if @@ -210,7 +210,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL { * - if a member M of T is forwarded to the implementation class, add * a forwarder for M unless one exists already. * The alias of the forwarder is the static member it forwards to. - * - for every abstract accessor in T, add a field and an implementation for that acessor + * - for every abstract accessor in T, add a field and an implementation for that accessor * - for every super accessor in T, add an implementation of that accessor * - for every module in T, add a module */ @@ -733,7 +733,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL { stats1 } - /** Does this field require an intialized bit? */ + /** Does this field require an initialized bit? */ def needsInitFlag(sym: Symbol) = { val res = (settings.checkInit.value && sym.isGetter @@ -991,7 +991,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL { case Super(_, mix) => // change super calls to methods in implementation classes to static calls. // Transform references super.m(args) as follows: - // - if `m' refers to a trait, insert a static call to the correspondign static + // - if `m' refers to a trait, insert a static call to the corresponding static // implementation // - otherwise return tree unchanged if (mix == nme.EMPTY.toTypeName && currentOwner.enclClass.isImplClass) diff --git a/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala b/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala index cdbea6fcfe..305f9218ec 100644 --- a/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala +++ b/src/compiler/scala/tools/nsc/transform/OverridingPairs.scala @@ -15,7 +15,7 @@ import annotation.tailrec /** A class that yields a kind of iterator (`Cursor`), * which yields all pairs of overriding/overridden symbols * that are visible in some baseclass, unless there's a parent class - * that aleady contains the same pairs. + * that already contains the same pairs. * @author Martin Odersky * @version 1.0 */ @@ -42,7 +42,7 @@ abstract class OverridingPairs { */ protected def parents: List[Type] = base.info.parents - /** Does `sym1` match `sym2` so that it qualifies as overiding. + /** Does `sym1` match `sym2` so that it qualifies as overriding. * Types always match. Term symbols match if their membertypes * relative to <base>.this do */ @@ -99,8 +99,8 @@ abstract class OverridingPairs { private val size = base.info.baseClasses.length - /** A map from baseclasses of <base> to ints, with smaller ints meansing lower in - * lineraizatuon order. + /** A map from baseclasses of <base> to ints, with smaller ints meaning lower in + * linearization order. */ private val index = new HashMap[Symbol, Int] @@ -176,13 +176,13 @@ abstract class OverridingPairs { /** The current entry candidate for overridden */ private var nextEntry = curEntry - /** The current candidate symbol for overridding */ + /** The current candidate symbol for overriding */ var overriding: Symbol = _ - /** If not null: The symbol overridden by overridding */ + /** If not null: The symbol overridden by overriding */ var overridden: Symbol = _ - //@M: note that next is called once during object initialisation + //@M: note that next is called once during object initialization def hasNext: Boolean = curEntry ne null @tailrec diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala index 1ad045d367..f76ab66aa4 100644 --- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala +++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala @@ -42,7 +42,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { env } - /** Is this typeenv included in `other'? All type variables in this environement + /** Is this typeenv included in `other'? All type variables in this environment * are defined in `other' and bound to the same type. */ def includes(t1: TypeEnv, t2: TypeEnv) = { @@ -54,7 +54,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { } } - /** Reduce the given environment to contain mappins only for type variables in tps. */ + /** Reduce the given environment to contain mappings only for type variables in tps. */ def reduce(env: TypeEnv, tps: immutable.Set[Symbol]): TypeEnv = { env filter { kv => tps.contains(kv._1)} } @@ -91,7 +91,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { case class Overload(sym: Symbol, env: TypeEnv) { override def toString: String = - "specalized overload " + sym + " in " + env + "specialized overload " + sym + " in " + env } /** The annotation used to mark specialized type parameters. */ @@ -158,7 +158,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { def hasSpecializedParams(clazz: Symbol): Boolean = !specializedParams(clazz).isEmpty - /** Return specialized type paramters. */ + /** Return specialized type parameters. */ def specializedParams(sym: Symbol): List[Symbol] = splitParams(sym.info.typeParams)._1 @@ -284,7 +284,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { Nil } - /** Return a list of all type environements for all specializations + /** Return a list of all type environments for all specializations * of @specialized types in `tps'. */ private def specializations(tps: List[Symbol]): List[TypeEnv] = { @@ -407,7 +407,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { decls1.enter(subst(fullEnv)(sym)) } - /** Create and enter in scope an overriden symbol m1 for `m' that forwards + /** Create and enter in scope an overridden symbol m1 for `m' that forwards * to `om'. `om' is a fresh, special overload of m1 that is an implementation * of `m'. For example, for a * @@ -658,7 +658,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { val oms = new mutable.ListBuffer[Symbol] while (opc.hasNext) { log("\toverriding pairs: " + opc.overridden.fullName + ": " + opc.overridden.info - + " overriden by " + opc.overriding.fullName + ": " + opc.overriding.info) + + " overridden by " + opc.overriding.fullName + ": " + opc.overriding.info) if (opc.overriding.owner == clazz && !specializedTypeVars(opc.overridden.info).isEmpty) { log("\t\tspecializedTVars: " + specializedTypeVars(opc.overridden.info)) val env = unify(opc.overridden.info, opc.overriding.info, emptyEnv) @@ -742,7 +742,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { override def default(key: Symbol) = emptyEnv } - /** Apply type bindings in the given environement `env' to all declarations. */ + /** Apply type bindings in the given environment `env' to all declarations. */ private def subst(env: TypeEnv, decls: List[Symbol]): List[Symbol] = decls map subst(env) @@ -831,7 +831,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { } else false } - /** The type environemnt is sound w.r.t. to all type bounds or only soft + /** The type environment is sound w.r.t. to all type bounds or only soft * conflicts appear. An environment is sound if all bindings are within * the bounds of the given type variable. A soft conflict is a binding * that does not fall within the bounds, but whose bounds contain @@ -974,7 +974,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { super.transform(tree) case PackageDef(pid, stats) => - tree.symbol.info // make sure specializations have been peformed + tree.symbol.info // make sure specializations have been performed log("PackageDef owner: " + symbol) atOwner(tree, symbol) { val specMembers = implSpecClasses(stats) map localTyper.typed @@ -1108,7 +1108,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { ValDef(param.cloneSymbol(symbol).setInfo(param.info.substSym(oldtparams, newtparams))) }) - // replace value and type paremeters of the old method with the new ones + // replace value and type parameters of the old method with the new ones val symSubstituter = new ImplementationAdapter( parameters(target).flatten ::: origtparams, vparamss1.flatten.map(_.symbol) ::: newtparams) diff --git a/src/compiler/scala/tools/nsc/transform/TailCalls.scala b/src/compiler/scala/tools/nsc/transform/TailCalls.scala index a3fedc0819..adeab550ee 100644 --- a/src/compiler/scala/tools/nsc/transform/TailCalls.scala +++ b/src/compiler/scala/tools/nsc/transform/TailCalls.scala @@ -72,7 +72,7 @@ abstract class TailCalls extends Transform * are optimized. Since 'this' is not a local variable, a dummy local val * is added and used as a label parameter. The backend knows to load * the corresponding argument in the 'this' (local at index 0). This dummy local - * is never used and should be cleand up by dead code elmination (when enabled). + * is never used and should be cleand up by dead code elimination (when enabled). * </p> * <p> * This phase has been moved before pattern matching to catch more diff --git a/src/compiler/scala/tools/nsc/transform/TypingTransformers.scala b/src/compiler/scala/tools/nsc/transform/TypingTransformers.scala index ab92b28735..65f3caf642 100644 --- a/src/compiler/scala/tools/nsc/transform/TypingTransformers.scala +++ b/src/compiler/scala/tools/nsc/transform/TypingTransformers.scala @@ -30,7 +30,7 @@ trait TypingTransformers { def atOwner[A](tree: Tree, owner: Symbol)(trans: => A): A = { val savedLocalTyper = localTyper -// println("ttransformer atOwner: " + owner + " isPackage? " + owner.isPackage) +// println("transformer atOwner: " + owner + " isPackage? " + owner.isPackage) localTyper = localTyper.atOwner(tree, if (owner.isModule) owner.moduleClass else owner) typers += Pair(owner, localTyper) val result = super.atOwner(owner)(trans) diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index 950bace533..e339560837 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -61,7 +61,7 @@ abstract class UnCurry extends InfoTransform with TypingTransformers { case MethodType(params, MethodType(params1, restpe)) => apply(MethodType(params ::: params1, restpe)) case MethodType(params, ExistentialType(tparams, restpe @ MethodType(_, _))) => - assert(false, "unexpected curried method types with intervening exitential") + assert(false, "unexpected curried method types with intervening existential") tp0 case PolyType(List(), restpe) => // nullary method type apply(MethodType(List(), restpe)) @@ -172,7 +172,7 @@ abstract class UnCurry extends InfoTransform with TypingTransformers { throw ex } - /* Is tree a reference `x' to a call by name parameter that neeeds to be converted to + /* Is tree a reference `x' to a call by name parameter that needs to be converted to * x.apply()? Note that this is not the case if `x' is used as an argument to another * call by name parameter. */ @@ -216,7 +216,7 @@ abstract class UnCurry extends InfoTransform with TypingTransformers { * * throw new NonLocalReturnControl(key, expr) * todo: maybe clone a pre-existing exception instead? - * (but what to do about excaptions that miss their targets?) + * (but what to do about exceptions that miss their targets?) */ private def nonLocalReturnThrow(expr: Tree, meth: Symbol) = localTyper.typed { diff --git a/src/compiler/scala/tools/nsc/typechecker/DeVirtualize.scala b/src/compiler/scala/tools/nsc/typechecker/DeVirtualize.scala index 71078ca564..a2e9f10a5a 100644 --- a/src/compiler/scala/tools/nsc/typechecker/DeVirtualize.scala +++ b/src/compiler/scala/tools/nsc/typechecker/DeVirtualize.scala @@ -137,7 +137,7 @@ abstract class DeVirtualize extends InfoTransform with TypingTransformers { protected def factoryName(clazz: Symbol) = atPhase(ownPhase) { newTermName("new$"+clazz.name) } - /** Does `clazz' contaion virtual classes? */ + /** Does `clazz' contain virtual classes? */ protected def containsVirtuals(clazz: Symbol) = clazz.info.decls.toList exists (_.isVirtualClass) /** The inner classes that need factory methods in `clazz' diff --git a/src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala b/src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala index bb9582b093..5b79662014 100644 --- a/src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala +++ b/src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala @@ -60,7 +60,7 @@ trait EtaExpansion { self: Analyzer => // Martin to Sean: I removed the // else if (n == 0) branch and changed `n' in the line above to `(cnt - 1)' // this was necessary because otherwise curried eta-expansions would get the same - // symbol. An example which failes test/files/run/Course-2002-02.scala + // symbol. An example which fails test/files/run/Course-2002-02.scala // todo: review and get rid of the `n' argument (which is unused right now). } // { cnt = cnt + 1; newTermName("eta$" + cnt) } diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index c83fd1bcb2..4c07e50da9 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -249,7 +249,7 @@ self: Analyzer => * by replacing variables by their upper bounds, * - all remaining free type parameters in the type are replaced by WildcardType. * The _complexity_ of a stripped core type corresponds roughly to the number of - * nodes in its ast, except that singleton types are widened befoe taking the complexity. + * nodes in its ast, except that singleton types are widened before taking the complexity. * Two types overlap if they have the same type symbol, or * if one or both are intersection types with a pair of overlapiing parent types. */ @@ -386,7 +386,7 @@ self: Analyzer => * or method type whose result type has a method whose name and type * correspond to the HasMethodMatching type, * or otherwise if `tp' is compatible with `pt'. - * This methid is performance critical: 5-8% of typechecking time. + * This method is performance critical: 5-8% of typechecking time. */ def matchesPt(tp: Type, pt: Type, undet: List[Symbol]) = { val start = startTimer(matchesPtNanos) @@ -523,7 +523,7 @@ self: Analyzer => * - the symbol's definition comes before, and does not contain the closest enclosing definition, * - the symbol's definition is a val, var, or def with an explicit result type * The aim of this method is to prevent premature cyclic reference errors - * by computing the types of only those implicitis for which one of these + * by computing the types of only those implicits for which one of these * conditions is true. */ def isValid(sym: Symbol) = { diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 85d73896b0..c0b54cb4f0 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -68,7 +68,7 @@ trait Infer { if (nformals == 1 && actuals.length != 1 && actuals.length <= definitions.MaxTupleArity && !phase.erasedTypes) List(atPos(pos)(gen.mkTuple(actuals))) else actuals - /** A fresh type varable with given type parameter as origin. + /** A fresh type variable with given type parameter as origin. * * @param tparam ... * @return ... @@ -162,7 +162,7 @@ trait Infer { for (tvar <- tvars) if (tvar.constr.inst == tvar) if (tvar.origin.typeSymbol.info eq ErrorType) { - // this can happen if during solving a cyclic type paramater + // this can happen if during solving a cyclic type parameter // such as T <: T gets completed. See #360 tvar.constr.inst = ErrorType } else assert(false, tvar.origin+" at "+tvar.origin.typeSymbol.owner) @@ -547,7 +547,7 @@ trait Infer { if (checkCompat(restpe.instantiateTypeParams(tparams, tvars), pt)) { try { // If the restpe is an implicit method, and the expected type is fully defined - // optimze type varianbles wrt to the implicit formals only; ignore the result type. + // optimze type variables wrt to the implicit formals only; ignore the result type. // See test pos/jesper.scala val varianceType = restpe match { case mt: MethodType if mt.isImplicit && isFullyDefined(pt) => @@ -849,7 +849,7 @@ trait Infer { } else { try { val (okparams, okargs, leftUndet) = methTypeArgs(undetparams, formals, restpe, argtpes, pt) - // #2665: must use weak conformance, not regular one (follow the monorphic case above) + // #2665: must use weak conformance, not regular one (follow the monomorphic case above) (exprTypeArgs(leftUndet, restpe.instantiateTypeParams(okparams, okargs), pt, isWeaklyCompatible) ne null) && isWithinBounds(NoPrefix, NoSymbol, okparams, okargs) } catch { @@ -989,7 +989,7 @@ trait Infer { ftpe1.isError || { val specificCount = (if (isAsSpecific(ftpe1, ftpe2)) 1 else 0) - (if (isAsSpecific(ftpe2, ftpe1) && - // todo: move to isAsSepecific test + // todo: move to isAsSpecific test // (!ftpe2.isInstanceOf[OverloadedType] || ftpe1.isInstanceOf[OverloadedType]) && (!phase.erasedTypes || covariantReturnOverride(ftpe1, ftpe2))) 1 else 0) val subClassCount = (if (isInProperSubClassOrObject(sym1, sym2)) 1 else 0) - diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 9edc245327..9ac628034f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -693,7 +693,7 @@ trait Namers { self: Analyzer => sym => TypeRef(clazz.owner.thisType, sym, clazz.typeParams map (_.tpe)))) println("Parents of "+clazz+":"+parents) - // check that virtual classses are only defined as members of templates + // check that virtual classes are only defined as members of templates if (clazz.isVirtualClass && !clazz.owner.isClass) context.error( clazz.pos, @@ -858,7 +858,7 @@ trait Namers { self: Analyzer => val site = meth.owner.thisType def overriddenSymbol = intersectionType(meth.owner.info.parents).member(meth.name).filter(sym => { - // luc: added .syubstSym from skolemized to deSkolemized + // luc: added .substSym from skolemized to deSkolemized // site.memberType(sym): PolyType(tparams, MethodType(..., ...)) ==> all references to tparams are deSkolemized // thisMethodType: tparams in PolyType are deSkolemized, the references in the MethodTypes are skolemized. ==> the two didn't match // for instance, B.foo would not override A.foo, and the default on parameter b would not be inherited @@ -1112,7 +1112,7 @@ trait Namers { self: Analyzer => /** For definitions, transform Annotation trees to AnnotationInfos, assign * them to the sym's annotations. Type annotations: see Typer.typedAnnotated - * We have to parse definition annotatinos here (not in the typer when traversing + * We have to parse definition annotations here (not in the typer when traversing * the MemberDef tree): the typer looks at annotations of certain symbols; if * they were added only in typer, depending on the compilation order, they would * be visible or not @@ -1245,11 +1245,11 @@ trait Namers { self: Analyzer => result match { case PolyType(tparams, restpe) if (!tparams.isEmpty && tparams.head.owner.isTerm || - // Adriaan: The added conditon below is quite a hack. It seems that HK type parameters is relying + // Adriaan: The added condition below is quite a hack. It seems that HK type parameters is relying // on a pass that forces all infos in the type to get everything right. // The problem is that the same pass causes cyclic reference errors in // test pos/cyclics.scala. It turned out that deSkolemize is run way more often than necessary, - // ruinning it only when needed fixes the cuclic reference errors. + // running it only when needed fixes the cyclic reference errors. // But correcting deSkolemize broke HK types, because we don't do the traversal anymore. // For the moment I made a special hack to do the traversal if we have HK type parameters. // Maybe it's not a hack, then we need to document it better. But ideally, we should find diff --git a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala index 6288c06a67..b5c5bc95ae 100644 --- a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala +++ b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala @@ -100,7 +100,7 @@ trait NamesDefaults { self: Analyzer => import context.unit /** - * Transform a function into a block, and assing context.namedApplyBlockInfo to + * Transform a function into a block, and passing context.namedApplyBlockInfo to * the new block as side-effect. * * `baseFun' is typed, the resulting block must be typed as well. diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index be2109c9f8..003a173892 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -851,7 +851,7 @@ abstract class RefChecks extends InfoTransform { val ownerTransformer = new ChangeOwnerTraverser(vsym, lazyDefSym) val lazyDef = atPos(tree.pos)( DefDef(lazyDefSym, ownerTransformer( - if (tree.symbol.owner.isTrait // for traits, this is further tranformed in mixins + if (tree.symbol.owner.isTrait // for traits, this is further transformed in mixins || hasUnitType) rhs else Block(List( Assign(gen.mkAttributedRef(vsym), rhs)), diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index e7410690a2..284b12e501 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -777,7 +777,7 @@ trait Typers { self: Analyzer => * (5) Convert constructors in a pattern as follows: * (5.1) If constructor refers to a case class factory, set tree's type to the unique * instance of its primary constructor that is a subtype of the expected type. - * (5.2) If constructor refers to an exractor, convert to application of + * (5.2) If constructor refers to an extractor, convert to application of * unapply or unapplySeq method. * * (6) Convert all other types to TypeTree nodes. @@ -898,7 +898,7 @@ trait Typers { self: Analyzer => !(tree.symbol.hasFlag(JAVA) && context.unit.isJava)) { // (7) // @M When not typing a higher-kinded type ((mode & HKmode) == 0) // or raw type (tree.symbol.hasFlag(JAVA) && context.unit.isJava), types must be of kind *, - // and thus parameterised types must be applied to their type arguments + // and thus parameterized types must be applied to their type arguments // @M TODO: why do kind-* tree's have symbols, while higher-kinded ones don't? errorTree(tree, tree.symbol+" takes type parameters") tree setType tree.tpe @@ -2034,7 +2034,7 @@ trait Typers { self: Analyzer => || pt.typeSymbol == PartialFunctionClass && fun.vparams.length == 1 && fun.body.isInstanceOf[Match]) - && // see bug901 for a reason why next conditions are neeed + && // see bug901 for a reason why next conditions are needed (pt.normalize.typeArgs.length - 1 == fun.vparams.length || fun.vparams.exists(_.tpt.isEmpty))) @@ -2629,7 +2629,7 @@ trait Typers { self: Analyzer => } /** Converts an untyped tree to a ClassfileAnnotArg. If the conversion fails, - * an error message is reporded and None is returned. + * an error message is reported and None is returned. */ def tree2ConstArg(tree: Tree, pt: Type): Option[ClassfileAnnotArg] = tree match { case ann @ Apply(Select(New(tpt), nme.CONSTRUCTOR), args) => @@ -2680,7 +2680,7 @@ trait Typers { self: Analyzer => case Select(New(tpt), nme.CONSTRUCTOR) => (fun, outerArgss) case _ => - error(fun.pos, "unexpected tree in annotationn: "+ fun) + error(fun.pos, "unexpected tree in annotation: "+ fun) (setError(fun), outerArgss) } extract(ann, List()) @@ -2717,7 +2717,7 @@ trait Typers { self: Analyzer => error(arg.pos, "unknown annotation argument name: " + name) (nme.ERROR, None) } else if (!names.contains(sym)) { - error(arg.pos, "duplicate value for anontation argument " + name) + error(arg.pos, "duplicate value for annotation argument " + name) (nme.ERROR, None) } else { names -= sym @@ -3127,7 +3127,7 @@ trait Typers { self: Analyzer => trackSetInfo(vble)( if (treeInfo.isSequenceValued(body)) seqType(body1.tpe) else body1.tpe) - treeCopy.Bind(tree, name, body1) setSymbol vble setType body1.tpe // buraq, was: pt + treeCopy.Bind(tree, name, body1) setSymbol vble setType body1.tpe // burak, was: pt } } @@ -3171,7 +3171,7 @@ trait Typers { self: Analyzer => def typedIf(cond: Tree, thenp: Tree, elsep: Tree) = { val cond1 = checkDead(typed(cond, EXPRmode | BYVALmode, BooleanClass.tpe)) - if (elsep.isEmpty) { // in the future, should be unecessary + if (elsep.isEmpty) { // in the future, should be unnecessary val thenp1 = typed(thenp, UnitClass.tpe) treeCopy.If(tree, cond1, thenp1, elsep) setType thenp1.tpe } else { @@ -3606,7 +3606,7 @@ trait Typers { self: Analyzer => var defSym: Symbol = tree.symbol // the directly found symbol var pre: Type = NoPrefix // the prefix type of defSym, if a class member - var qual: Tree = EmptyTree // the qualififier tree if transformed tree is a select + var qual: Tree = EmptyTree // the qualifier tree if transformed tree is a select // A symbol qualifies if it exists and is not stale. Stale symbols // are made to disappear here. In addition, diff --git a/src/compiler/scala/tools/nsc/util/DocStrings.scala b/src/compiler/scala/tools/nsc/util/DocStrings.scala index c0d716fa90..7ca2722a54 100755 --- a/src/compiler/scala/tools/nsc/util/DocStrings.scala +++ b/src/compiler/scala/tools/nsc/util/DocStrings.scala @@ -73,7 +73,7 @@ object DocStrings { * pairs of start/end positions of all tagged sections in the string. * Every section starts with a `@' and extends to the next `@', or * to the end of the comment string, but excluding the final two - * charcters which terminate the comment. + * characters which terminate the comment. */ def tagIndex(str: String, p: Int => Boolean = (idx => true)): List[(Int, Int)] = findAll(str, 0) (idx => str(idx) == '@' && p(idx)) match { diff --git a/src/compiler/scala/tools/util/PathResolver.scala b/src/compiler/scala/tools/util/PathResolver.scala index d7e420a5c5..716b0b43dc 100644 --- a/src/compiler/scala/tools/util/PathResolver.scala +++ b/src/compiler/scala/tools/util/PathResolver.scala @@ -79,7 +79,7 @@ object PathResolver { ) } - /** Default values based on those in Environment as interpretered according + /** Default values based on those in Environment as interpreted according * to the path resolution specification. */ object Defaults { diff --git a/src/dbc/scala/dbc/datatype/Factory.scala b/src/dbc/scala/dbc/datatype/Factory.scala index f98c699787..a7640cc642 100644 --- a/src/dbc/scala/dbc/datatype/Factory.scala +++ b/src/dbc/scala/dbc/datatype/Factory.scala @@ -22,7 +22,7 @@ object Factory { final val java_lang_Integer_SIZE = 32; final val java_lang_Long_SIZE = 64; - /** Returns a mullable property formated as a boolean option */ + /** Returns a nullable property formatted as a boolean option */ def isNullable (metadata:java.sql.ResultSetMetaData, index:Int): Option[scala.Boolean] = metadata.isNullable(index) match { case java.sql.ResultSetMetaData.columnNoNulls => Some(false); diff --git a/src/forkjoin/scala/concurrent/forkjoin/RecursiveTask.java b/src/forkjoin/scala/concurrent/forkjoin/RecursiveTask.java index 1f3110580b..a526f75597 100644 --- a/src/forkjoin/scala/concurrent/forkjoin/RecursiveTask.java +++ b/src/forkjoin/scala/concurrent/forkjoin/RecursiveTask.java @@ -37,7 +37,7 @@ package scala.concurrent.forkjoin; public abstract class RecursiveTask<V> extends ForkJoinTask<V> { /** - * Empty contructor for use by subclasses. + * Empty constructor for use by subclasses. */ protected RecursiveTask() { } diff --git a/src/library/scala/Array.scala b/src/library/scala/Array.scala index a7d27d0b9d..f89e8b48a5 100644 --- a/src/library/scala/Array.scala +++ b/src/library/scala/Array.scala @@ -24,10 +24,10 @@ class FallbackArrayBuilding { /** A builder factory that generates a generic array. * Called instead of Array.newBuilder if the element type of an array - * does not have a class manifest. Note that fallbackBuilder fcatory + * 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 is always - * succesfull. + * successfull. */ implicit def fallbackCanBuildFrom[T](implicit m: DummyImplicit): CanBuildFrom[Array[_], T, ArraySeq[T]] = new CanBuildFrom[Array[_], T, ArraySeq[T]] { diff --git a/src/library/scala/Enumeration.scala b/src/library/scala/Enumeration.scala index 1346f4f469..3c8f5cf0bd 100644 --- a/src/library/scala/Enumeration.scala +++ b/src/library/scala/Enumeration.scala @@ -253,7 +253,7 @@ abstract class Enumeration(initial: Int, names: String*) { thisenum => /** A class implementing the <a href="Enumeration.Value.html" * target="contentFrame"><code>Value</code></a> type. This class can be - * overriden to change the enumeration's naming and integer identification + * overridden to change the enumeration's naming and integer identification * behaviour. */ @serializable diff --git a/src/library/scala/Immutable.scala b/src/library/scala/Immutable.scala index 3b6fe28d52..bc0a6100f6 100644 --- a/src/library/scala/Immutable.scala +++ b/src/library/scala/Immutable.scala @@ -11,7 +11,7 @@ package scala -/** A marker trait for all immutable datastructures such as imutable +/** A marker trait for all immutable datastructures such as immutable * collections. * * @since 2.8 diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index 20d70edadf..2037705bab 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -321,7 +321,7 @@ object Predef extends LowPriorityImplicits { implicit def conformsOrViewsAs[A <% B, B]: A <%< B = new (A <%< B) {def apply(x: A) = x} } - /** A type for which there is aways an implicit value. + /** A type for which there is always an implicit value. * @see fallbackCanBuildFrom in Array.scala */ class DummyImplicit diff --git a/src/library/scala/collection/Iterator.scala b/src/library/scala/collection/Iterator.scala index a8e99836dc..701b24f300 100644 --- a/src/library/scala/collection/Iterator.scala +++ b/src/library/scala/collection/Iterator.scala @@ -135,7 +135,7 @@ object Iterator { } /** Creates an infinite-length iterator returning the results of evaluating - * an expression. The epxression is recomputed for every element. + * an expression. The expression is recomputed for every element. * * @param elem the element computation. * @return the iterator containing an infinite number of results of evaluating `elem`. @@ -254,7 +254,7 @@ object Iterator { def next(): Int = { val j = i; i = step(i); j } } - /** Create an iterator that is the concantenation of all iterators + /** Create an iterator that is the concatenation of all iterators * returned by a given iterator of iterators. * @param its The iterator which returns on each call to next * a new iterator whose elements are to be concatenated to the result. @@ -357,8 +357,8 @@ trait Iterator[+A] extends TraversableOnce[A] { /** Creates a new iterator that maps all produced values of this iterator * to new values using a transformation function. * @param f the transformation function - * @return a new iterator which transformes every value produced by this - * iterator by applying the functon `f` to it. + * @return a new iterator which transforms every value produced by this + * iterator by applying the function `f` to it. */ def map[B](f: A => B): Iterator[B] = new Iterator[B] { def hasNext = self.hasNext @@ -709,12 +709,12 @@ trait Iterator[+A] extends TraversableOnce[A] { if (found) i else -1 } - /** Returns the index of the first occurence of the specified + /** Returns the index of the first occurrence of the specified * object in this iterable object. * $mayNotTerminateInf * * @param elem element to search for. - * @return the index of the first occurence of `elem` in the values produced by this iterator, + * @return the index of the first occurrence of `elem` in the values produced by this iterator, * or -1 if such an element does not exist until the end of the iterator is reached. */ def indexOf[B >: A](elem: B): Int = { @@ -985,7 +985,7 @@ trait Iterator[+A] extends TraversableOnce[A] { } } - /** Tests if another iterator produces the same valeus as this one. + /** Tests if another iterator produces the same values as this one. * $willNotTerminateInf * @param that the other iterator * @return `true`, if both iterators produce the same elements in the same order, `false` otherwise. diff --git a/src/library/scala/collection/JavaConversions.scala b/src/library/scala/collection/JavaConversions.scala index 0059ab1fca..00f2d745af 100644 --- a/src/library/scala/collection/JavaConversions.scala +++ b/src/library/scala/collection/JavaConversions.scala @@ -40,7 +40,7 @@ package scala.collection * <p> * Note that no conversion is provided from <code>scala.collection.immutable.List</code> * to <code>java.util.List</code>. Instead it is convertible to an immutable - * <code>java.util.Collection</code> which provides size and interation + * <code>java.util.Collection</code> which provides size and interaction * capabilities, but not access by index as would be provided by * <code>java.util.List</code>.<br/> * This is intentional: in combination the implementation of diff --git a/src/library/scala/collection/LinearSeqOptimized.scala b/src/library/scala/collection/LinearSeqOptimized.scala index dda74da394..7d3c58ad85 100755 --- a/src/library/scala/collection/LinearSeqOptimized.scala +++ b/src/library/scala/collection/LinearSeqOptimized.scala @@ -53,7 +53,7 @@ trait LinearSeqOptimized[+A, +Repr <: LinearSeqOptimized[A, Repr]] extends Linea /** Selects an element by its index in the $coll. * Note: the execution of `apply` may take time proportial to the index value. - * @throws `IndexOutOfBoundsEsxception` if `idx` does not satisfy `0 <= idx < length`. + * @throws `IndexOutOfBoundsException` if `idx` does not satisfy `0 <= idx < length`. */ def apply(n: Int): A = { val rest = drop(n) diff --git a/src/library/scala/collection/MapLike.scala b/src/library/scala/collection/MapLike.scala index f43f7a2ca5..5e1af7a2d7 100644 --- a/src/library/scala/collection/MapLike.scala +++ b/src/library/scala/collection/MapLike.scala @@ -110,7 +110,7 @@ self => * @param default a computation that yields a default value in case no binding for `key` is * found in the map. * @tparam B1 the result type of the default computation. - * @return the value assocuated with `key` if it exists, + * @return the value associated with `key` if it exists, * otherwise the result of the `default` computation. * @usecase def getOrElse(key: A, default: => B): B */ @@ -322,7 +322,7 @@ self => /** Defines the prefix of this object's `toString` representation. * @return a string representation which starts the result of `toString` applied to this $coll. - * Unless overridden in subclasse, the string prefix of every map is `"Map"`. + * Unless overridden in subclasses, the string prefix of every map is `"Map"`. */ override def stringPrefix: String = "Map" diff --git a/src/library/scala/collection/SeqLike.scala b/src/library/scala/collection/SeqLike.scala index 9dc102fb11..0db64926a6 100644 --- a/src/library/scala/collection/SeqLike.scala +++ b/src/library/scala/collection/SeqLike.scala @@ -169,7 +169,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self => * * @param idx The index to select. * @return the element of this $coll at index `idx`, where `0` indicates the first element. - * @throws `IndexOutOfBoundsEsxception` if `idx` does not satisfy `0 <= idx < length`. + * @throws `IndexOutOfBoundsException` if `idx` does not satisfy `0 <= idx < length`. */ def apply(idx: Int): A @@ -212,7 +212,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self => */ def isDefinedAt(idx: Int): Boolean = (idx >= 0) && (idx < length) - /** Computes length of longest segment whose elements all satisfy some preficate. + /** Computes length of longest segment whose elements all satisfy some predicate. * * $mayNotTerminateInf * @@ -229,7 +229,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self => i } - /** Returns the length of the longest prefix whose elements all satisfy some preficate. + /** Returns the length of the longest prefix whose elements all satisfy some predicate. * * $mayNotTerminateInf * @@ -269,7 +269,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self => -1 } - /** Returns index of the first element satisying a predicate, or `-1`. + /** Returns index of the first element satisfying a predicate, or `-1`. */ def findIndexOf(p: A => Boolean): Int = indexWhere(p) @@ -494,7 +494,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self => /** Finds last index before or at a given end index where this $coll contains a given sequence as a slice. * @param that the sequence to test - * @param end the end idnex + * @param end the end index * @return the last index `<= end` such that the elements of this $coll starting at this index * match the elements of sequence `that`, or `-1` of no such subsequence exists. */ @@ -849,7 +849,7 @@ trait SeqLike[+A, +Repr] extends IterableLike[A, Repr] { self => */ override def toString = super[IterableLike].toString - /** Returns index of the last element satisying a predicate, or -1. + /** Returns index of the last element satisfying a predicate, or -1. */ @deprecated("use `lastIndexWhere` instead") def findLastIndexOf(p: A => Boolean): Int = lastIndexWhere(p) diff --git a/src/library/scala/collection/SetLike.scala b/src/library/scala/collection/SetLike.scala index 156d0d8b2b..48b5358afc 100644 --- a/src/library/scala/collection/SetLike.scala +++ b/src/library/scala/collection/SetLike.scala @@ -187,7 +187,7 @@ self => * @note This operation contains an unchecked cast: if `that` * is a set, it will assume with an unchecked cast * that it has the same element type as this set. - * Any subsequuent ClassCastException is treated as a `false` result. + * Any subsequent ClassCastException is treated as a `false` result. */ override def equals(that: Any): Boolean = that match { case that: Set[_] => diff --git a/src/library/scala/collection/TraversableProxy.scala b/src/library/scala/collection/TraversableProxy.scala index 4a14937781..dd450dccac 100644 --- a/src/library/scala/collection/TraversableProxy.scala +++ b/src/library/scala/collection/TraversableProxy.scala @@ -11,7 +11,7 @@ package scala.collection -// Methods could be printed by cat TraversibeLike.scala | egrep '^ (override )?def' +// Methods could be printed by cat TraverableLike.scala | egrep '^ (override )?def' /** This trait implements a proxy for traversable objects. It forwards diff --git a/src/library/scala/collection/TraversableView.scala b/src/library/scala/collection/TraversableView.scala index 8a67b8d10f..e9332097e7 100644 --- a/src/library/scala/collection/TraversableView.scala +++ b/src/library/scala/collection/TraversableView.scala @@ -18,7 +18,7 @@ import TraversableView.NoBuilder /** <p> * A base class for views of <a href="../Traversable.html" * target="ContentFrame"><code>Traversable<code></a>.<br/> - * Every subclass has to implenment the <code>foreach</code> method. + * Every subclass has to implement the <code>foreach</code> method. * </p> * * @author Martin Odersky diff --git a/src/library/scala/collection/generic/IterableForwarder.scala b/src/library/scala/collection/generic/IterableForwarder.scala index 4debb19ad1..f4aef2fcbb 100644 --- a/src/library/scala/collection/generic/IterableForwarder.scala +++ b/src/library/scala/collection/generic/IterableForwarder.scala @@ -22,7 +22,7 @@ import collection.mutable.Buffer * <li><code>toString</code>, <code>hashCode</code>, <code>equals</code>, * <code>stringPrefix</code></li> * <li><code>newBuilder</code>, <code>view</code></li> - * <li>all calls creating a new iterable objetc of the same kind</li> + * <li>all calls creating a new iterable object of the same kind</li> * </ul> * <p> * The above methods are forwarded by subclass <a href="../IterableProxy.html" diff --git a/src/library/scala/collection/immutable/IntMap.scala b/src/library/scala/collection/immutable/IntMap.scala index 6d72c0bb1a..62309a9f48 100644 --- a/src/library/scala/collection/immutable/IntMap.scala +++ b/src/library/scala/collection/immutable/IntMap.scala @@ -360,7 +360,7 @@ sealed abstract class IntMap[+T] extends Map[Int, T] with MapLike[Int, T, IntMap } /** - * 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/List.scala b/src/library/scala/collection/immutable/List.scala index 7522cc370f..2b91ab8852 100644 --- a/src/library/scala/collection/immutable/List.scala +++ b/src/library/scala/collection/immutable/List.scala @@ -388,7 +388,7 @@ case object Nil extends List[Nothing] { throw new NoSuchElementException("head of empty list") override def tail: List[Nothing] = throw new UnsupportedOperationException("tail of empty list") - // Removal of equals method here might lead to an infinite recusion similar to IntMap.equals. + // Removal of equals method here might lead to an infinite recursion similar to IntMap.equals. override def equals(that: Any) = that match { case that1: Seq[_] => 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 <code>ListMap.empty</code>. * * @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 <code>iterator</code> 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 <code>n</code> 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.</p> * * @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 * *<p> * 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 { * </p> * * @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 - * <code>top</code> method. Framework intialization is done by this class. + * <code>top</code> 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) |