From f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1 Mon Sep 17 00:00:00 2001
From: Paul Phillips iold
with is
. It does not update
- * the position field in the newly inserted instrucitons, so it behaves
+ * the position field in the newly inserted instructions, so it behaves
* differently than the one-instruction versions of this function.
*
* @param iold ..
@@ -335,7 +335,7 @@ trait BasicBlocks {
}
/** Emitting does not set touched to true. During code generation this is a hotspot and
- * setting the flag for each emit is a waste. Caching should happend only after a block
+ * setting the flag for each emit is a waste. Caching should happen only after a block
* is closed, which sets the DIRTYSUCCS flag.
*/
def emit(instr: Instruction, pos: Position) {
@@ -493,7 +493,7 @@ trait BasicBlocks {
succs.flatMap(findSucc).distinct
}
- /** Returns the precessors of this block. */
+ /** Returns the predecessors of this block. */
def predecessors: List[BasicBlock] = {
if (hasFlag(DIRTYPREDS)) {
resetFlag(DIRTYPREDS)
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala b/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala
index c3fadb1abf..c34cefdc12 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/Checkers.scala
@@ -94,7 +94,7 @@ abstract class Checkers {
clasz.methods.foreach(check)
}
- /** Apply the give funtion to each pair of the cartesian product of
+ /** Apply the give function to each pair of the cartesian product of
* l1 x l2.
*/
def pairwise[a](l1: List[a], l2: List[a])(f: (a, a) => Unit) =
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index a073943cd3..b1d1849c71 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -51,7 +51,7 @@ abstract class GenICode extends SubComponent {
var unit: CompilationUnit = _
- // We assume definitions are alread initialized
+ // We assume definitions are already initialized
val STRING = REFERENCE(StringClass)
// this depends on the backend! should be changed.
@@ -1445,7 +1445,7 @@ abstract class GenICode extends SubComponent {
assert(ctx.clazz.symbol eq cls,
"Classes are not the same: " + ctx.clazz.symbol + ", " + cls)
- /** Non-method term members are fields, except for moudle members. Module
+ /** Non-method term members are fields, except for module members. Module
* members can only happen on .NET (no flatten) for inner traits. There,
* a module symbol is generated (transformInfo in mixin) which is used
* as owner for the members of the implementation class (so that the
@@ -1909,7 +1909,7 @@ abstract class GenICode extends SubComponent {
val kind = toTypeKind(tree.tpe)
val guardResult = kind != UNIT && mayCleanStack(finalizer)
// we need to save bound labels before any code generation is performed on
- // the current context (otherwise, any new lables in the finalizer that need to
+ // the current context (otherwise, any new labels in the finalizer that need to
// be duplicated would be incorrectly considered bound -- see #2850).
val boundLabels: collection.Set[Symbol] = Set.empty ++ labels.keySet
@@ -2129,7 +2129,7 @@ abstract class GenICode extends SubComponent {
///////////////// Fake instructions //////////////////////////
/**
- * Pseudo jump: it takes a Label instead of a basick block.
+ * Pseudo jump: it takes a Label instead of a basic block.
* It is used temporarily during code generation. It is replaced
* by a real JUMP instruction when all labels are resolved.
*/
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala
index be580d7154..c0255cda65 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala
@@ -355,7 +355,7 @@ trait Opcodes { self: ICodes =>
0
else 1
- /** object idenity is equality for CALL_METHODs. Needed for
+ /** object identity is equality for CALL_METHODs. Needed for
* being able to store such instructions into maps, when more
* than one CALL_METHOD to the same method might exist.
*/
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
index d093f5c1c9..40eb08adfd 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -352,7 +352,7 @@ abstract class GenJVM extends SubComponent {
val buf: ByteBuffer = ByteBuffer.allocate(512)
var nattr = 0
- // put some radom value; the actual number is determined at the end
+ // put some random value; the actual number is determined at the end
buf.putShort(0xbaba.toShort)
for (AnnotationInfo(tp, List(exc), _) <- excs.distinct if tp.typeSymbol == definitions.ThrowsClass) {
@@ -369,7 +369,7 @@ abstract class GenJVM extends SubComponent {
}
/** Whether an annotation should be emitted as a Java annotation
- * .initialize: if 'annnot' is read from pickle, atp might be un-initialized
+ * .initialize: if 'annot' is read from pickle, atp might be un-initialized
*/
private def shouldEmitAnnotation(annot: AnnotationInfo) =
(annot.atp.typeSymbol.initialize.hasFlag(Flags.JAVA) &&
@@ -1087,7 +1087,7 @@ abstract class GenJVM extends SubComponent {
case LOAD_MODULE(module) =>
// assert(module.isModule, "Expected module: " + module)
if (settings.debug.value)
- log("genearting LOAD_MODULE for: " + module + " flags: " +
+ log("generating LOAD_MODULE for: " + module + " flags: " +
Flags.flagsToString(module.flags));
if (clasz.symbol == module.moduleClass && jmethod.getName() != nme.readResolve.toString)
jcode.emitALOAD_0()
diff --git a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
index f4cf5a7089..285e09295d 100644
--- a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
+++ b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
@@ -325,7 +325,7 @@ abstract class GenMSIL extends SubComponent {
annType.CreateType() // else, GetConstructors can't be used
val constr: ConstructorInfo = annType.GetConstructors()(0)
// prevent a second call of CreateType, only needed because there's no
- // otehr way than GetConstructors()(0) to get the constructor, if there's
+ // other way than GetConstructors()(0) to get the constructor, if there's
// no constructor symbol available.
val args: Array[Byte] =
@@ -601,7 +601,7 @@ abstract class GenMSIL extends SubComponent {
genBlocks(linearization)
// RETURN inside exception blocks are replaced by Leave. The target of the
- // levae is a `Ret` outside any exception block (generated here).
+ // leave is a `Ret` outside any exception block (generated here).
if (handlerReturnMethod == m) {
mcode.MarkLabel(handlerReturnLabel)
if (handlerReturnKind != UNIT)
@@ -1467,7 +1467,7 @@ abstract class GenMSIL extends SubComponent {
def emitBrBool(cond: TestOp, dest: Label) {
cond match {
// EQ -> Brfalse, NE -> Brtrue; this is because we come from
- // a CZJUMP. If the value on the stack is 0 (e.g. a boolen
+ // a CZJUMP. If the value on the stack is 0 (e.g. a boolean
// method returned false), and we are in the case EQ, then
// we need to emit Brfalse (EQ Zero means false). vice versa
case EQ => mcode.Emit(OpCodes.Brfalse, dest)
@@ -1599,7 +1599,7 @@ abstract class GenMSIL extends SubComponent {
if (sym.isStaticMember)
mf = mf | FieldAttributes.Static
- // TRANSIENT: "not nerialized", VOLATILE: doesn't exist on .net
+ // TRANSIENT: "not serialized", VOLATILE: doesn't exist on .net
// TODO: add this annotation also if the class has the custom attribute
// System.NotSerializedAttribute
sym.annotations.foreach( a => a match {
@@ -1874,7 +1874,7 @@ abstract class GenMSIL extends SubComponent {
/** Adds a static initializer which creates an instance of the module
* class (calls the primary constructor). A special primary constructor
- * will be generated (notInitializedModules) which stores the new intance
+ * will be generated (notInitializedModules) which stores the new instance
* in the MODULE$ field right after the super call.
*/
private def addStaticInit(sym: Symbol) {
@@ -2131,7 +2131,7 @@ abstract class GenMSIL extends SubComponent {
}
/*
- * add maping for member with name and paramTypes to member
+ * add mapping for member with name and paramTypes to member
* newName of newClass (same parameters)
*/
private def mapMethod(
diff --git a/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala
index 1812753ccd..7311978147 100644
--- a/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala
+++ b/src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala
@@ -37,7 +37,7 @@ abstract class ClosureElimination extends SubComponent {
}
/**
- * Remove references to the environemnt through fields of a closure object.
+ * Remove references to the environment through fields of a closure object.
* This has to be run after an 'apply' method has been inlined, but it still
* references the closure object.
*
diff --git a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
index b9d4b8d5a4..29d0c37c84 100644
--- a/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
+++ b/src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
@@ -130,7 +130,7 @@ abstract class DeadCodeElimination extends SubComponent {
}
/** Mark useful instructions. Instructions in the worklist are each inspected and their
- * dependecies are marked useful too, and added to the worklist.
+ * dependencies are marked useful too, and added to the worklist.
*/
def mark {
// log("Starting with worklist: " + worklist)
diff --git a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala
index 22667dff49..cb87301b6a 100644
--- a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala
+++ b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala
@@ -104,7 +104,7 @@ abstract class Inliners extends SubComponent {
}
val instrAfter = block.toList.drop(instrBefore.length + 1);
- assert(!instrAfter.isEmpty, "CALL_METHOD cannot be the last instrcution in block!");
+ assert(!instrAfter.isEmpty, "CALL_METHOD cannot be the last instruction in block!");
// store the '$this' into the special local
val inlinedThis = new Local(caller.symbol.newVariable(instr.pos, freshName("$inlThis")), REFERENCE(definitions.ObjectClass), false);
diff --git a/src/compiler/scala/tools/nsc/doc/html/page/Source.scala b/src/compiler/scala/tools/nsc/doc/html/page/Source.scala
index f0206db4f4..22568e0a88 100644
--- a/src/compiler/scala/tools/nsc/doc/html/page/Source.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/page/Source.scala
@@ -24,7 +24,7 @@ class Source(sourceFile: File) extends HtmlPage {
val body =
- Page source is not implmented yet
+ Page source is not implemented yet
/*
diff --git a/src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala b/src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala
index 681ef4e02a..989dfa048e 100644
--- a/src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala
@@ -11,7 +11,7 @@ import scala.collection._
abstract class TypeEntity {
- /** A string reprsentation of this type. */
+ /** A string representation of this type. */
def name: String
/** Maps which parts of this type's name reference other entities. The map is indexed by the position of the first
diff --git a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
index 1f4794baf8..1a0bf37a84 100644
--- a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
@@ -247,7 +247,7 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory =>
protected final class WikiParser(val buffer: Array[Char], pos: Position) extends CharReader(buffer) { wiki =>
/** listStyle ::= '-' spc | '1.' spc | 'I.' spc | 'i.' spc | 'A.' spc | 'a.' spc
- * Characters used to build lists and their contructors */
+ * Characters used to build lists and their constructors */
protected val listStyles = Map[String, (Seq[Block] => Block)]( // TODO Should this be defined at some list companion?
"- " -> ( UnorderedList(_) ),
"1. " -> ( OrderedList(_,"decimal") ),
diff --git a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
index 5c16bb4465..26f7fb1115 100644
--- a/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
+++ b/src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
@@ -134,7 +134,7 @@ trait CompilerControl { self: Global =>
/** Tell the compile server to shutdown, and do not restart again */
def askShutdown() = scheduler raise ShutdownReq
- // ---------------- Interpreted exeptions -------------------
+ // ---------------- Interpreted exceptions -------------------
object CancelActionReq extends ControlThrowable
object FreshRunReq extends ControlThrowable
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index 73b728d646..03fd92235d 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -110,7 +110,7 @@ self =>
// ----------------- Polling ---------------------------------------
/** Called from runner thread and signalDone:
- * Poll for exeptions.
+ * Poll for exceptions.
* Poll for work reload/typedTreeAt/doFirst commands during background checking.
*/
def pollForWork() {
@@ -269,7 +269,7 @@ self =>
firsts = fs ::: (firsts diff fs)
}
- // ----------------- Implementations of client commmands -----------------------
+ // ----------------- Implementations of client commands -----------------------
def respond[T](result: Response[T])(op: => T): Unit =
try {
diff --git a/src/compiler/scala/tools/nsc/interactive/RangePositions.scala b/src/compiler/scala/tools/nsc/interactive/RangePositions.scala
index 0186103aa1..337f306664 100644
--- a/src/compiler/scala/tools/nsc/interactive/RangePositions.scala
+++ b/src/compiler/scala/tools/nsc/interactive/RangePositions.scala
@@ -103,7 +103,7 @@ self: scala.tools.nsc.Global =>
/** Ensure that given tree has no positions that overlap with
* any of the positions of `others`. This is done by
- * shortening the range or assinging TransparentPositions
+ * shortening the range or assigning TransparentPositions
* to some of the nodes in `tree`.
*/
override def ensureNonOverlapping(tree: Tree, others: List[Tree]) {
diff --git a/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala b/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala
index bcc58ec448..3f59824ec2 100644
--- a/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala
+++ b/src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala
@@ -104,7 +104,7 @@ class RefinedBuildManager(val settings: Settings) extends Changes with BuildMana
mutable.HashMap[AbstractFile, immutable.Set[AbstractFile]]()
compiler.reporter.reset
- // See if we really have coresponding symbols, not just those
+ // See if we really have corresponding symbols, not just those
// which share the name
def isCorrespondingSym(from: Symbol, to: Symbol): Boolean =
(from.hasFlag(Flags.TRAIT) == to.hasFlag(Flags.TRAIT)) &&
@@ -301,7 +301,7 @@ class RefinedBuildManager(val settings: Settings) extends Changes with BuildMana
defs <- definitions.get(classFile);
s <- defs.find(p => p.sym.fullName == q)
if ((s.sym).tpe.nonPrivateMember(member) == compiler.NoSymbol))
- invalidate(file, "it references invalid (no longer inherited) defintion", change)
+ invalidate(file, "it references invalid (no longer inherited) definition", change)
()
case _ => ()
}
diff --git a/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala b/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala
index 932450b01a..b3957e1062 100644
--- a/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala
+++ b/src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala
@@ -23,7 +23,7 @@ trait InteractiveReader {
catching(handler) { readOneLine(prompt) }
}
- // overide if history is available
+ // override if history is available
def history: Option[History] = None
def historyList = history map (_.asList) getOrElse Nil
diff --git a/src/compiler/scala/tools/nsc/io/File.scala b/src/compiler/scala/tools/nsc/io/File.scala
index efa4ab46da..887bf4b55d 100644
--- a/src/compiler/scala/tools/nsc/io/File.scala
+++ b/src/compiler/scala/tools/nsc/io/File.scala
@@ -51,7 +51,7 @@ import Path._
/** An abstraction for files. For character data, a Codec
* can be supplied at either creation time or when a method
* involving character data is called (with the latter taking
- * precdence if supplied.) If neither is available, the value
+ * precedence if supplied.) If neither is available, the value
* of scala.io.Codec.default is used.
*
* @author Paul Phillips
diff --git a/src/compiler/scala/tools/nsc/plugins/Plugins.scala b/src/compiler/scala/tools/nsc/plugins/Plugins.scala
index 8a86c982d9..e800e0f904 100644
--- a/src/compiler/scala/tools/nsc/plugins/Plugins.scala
+++ b/src/compiler/scala/tools/nsc/plugins/Plugins.scala
@@ -30,9 +30,9 @@ trait Plugins
val dirs = (settings.pluginsDir.value split File.pathSeparator).toList map Path.apply
val classes = Plugin.loadAllFrom(jars, dirs, settings.disable.value)
- // Lach plugin must only be instantiated once. A commong pattern
+ // Lach plugin must only be instantiated once. A common pattern
// is to register annotation checkers during object construction, so
- // creating multiple plugin instances will leave behind stale checkers. s
+ // creating multiple plugin instances will leave behind stale checkers.
classes map (Plugin.instantiate(_, this))
}
diff --git a/src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala b/src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala
index f32c232316..efb68c4873 100644
--- a/src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala
+++ b/src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala
@@ -74,7 +74,7 @@ trait AnnotationInfos extends reflect.generic.AnnotationInfos { self: SymbolTabl
* class).
*
- * Annotations are pickled (written to scala symbtab attribute
+ * Annotations are pickled (written to scala symtab attribute
* in the classfile) if atp
inherits form
* StaticAnnotation
.
*
index
.
+ /** Store type and everything it refers to in map index
.
*
* @param tp ...
*/
diff --git a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
index 8cfa3926a3..92f117428a 100644
--- a/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
+++ b/src/compiler/scala/tools/nsc/transform/AddInterfaces.scala
@@ -116,7 +116,7 @@ abstract class AddInterfaces extends InfoTransform {
*
* iface
its implemention
+ * for every interface member of iface
its implementation
* method, if one is needed.
*
* Add an outer accessor $outer$$C
to every inner class
* with fully qualified name C
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.
*
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) {
*
* 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
* Note that no conversion is provided from
* A base class for views of Value
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
* scala.collection.immutable.List
* to java.util.List
. Instead it is convertible to an immutable
- * java.util.Collection
which provides size and interation
+ * java.util.Collection
which provides size and interaction
* capabilities, but not access by index as would be provided by
* java.util.List
.
* 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
/** Traversable
.
- * Every subclass has to implenment the foreach
method.
+ * Every subclass has to implement the foreach
method.
* toString
, hashCode
, equals
,
* stringPrefix
newBuilder
, view
* Use this combinator when a parser depends on the result of a previous parser. `p' should be @@ -662,7 +662,7 @@ trait Parsers { /** A parser generator that generalises the rep1sep generator so that `q', which parses the separator, * produces a right-associative function that combines the elements it separates. Additionally, - * The right-most (last) element and the left-most combinating function have to be supplied. + * The right-most (last) element and the left-most combining function have to be supplied. * * rep1sep(p: Parser[T], q) corresponds to chainr1(p, q ^^ cons, cons, Nil) (where val cons = (x: T, y: List[T]) => x :: y) * diff --git a/src/library/scala/xml/dtd/Decl.scala b/src/library/scala/xml/dtd/Decl.scala index ddc179b69f..2ac3d42a67 100644 --- a/src/library/scala/xml/dtd/Decl.scala +++ b/src/library/scala/xml/dtd/Decl.scala @@ -110,7 +110,7 @@ case class IntDef(value:String) extends EntityDef { val n = tmp.substring(ix, iz); if( !Utility.isName( n )) - throw new IllegalArgumentException("interal entity def: \""+n+"\" must be an XML Name"); + throw new IllegalArgumentException("internal entity def: \""+n+"\" must be an XML Name"); tmp = tmp.substring(iz+1, tmp.length()); ix = tmp.indexOf('%'); diff --git a/src/library/scala/xml/include/sax/Main.scala b/src/library/scala/xml/include/sax/Main.scala index 3aa281451c..60031b4b6a 100644 --- a/src/library/scala/xml/include/sax/Main.scala +++ b/src/library/scala/xml/include/sax/Main.scala @@ -26,7 +26,7 @@ object Main { *
* * @param args contains the URLs and/or filenames - * of the documents to be procesed. + * of the documents to be processed. */ def main(args: Array[String]) { def saxe[T](body: => T) = catching[T](classOf[SAXException]) opt body diff --git a/src/library/scala/xml/parsing/DefaultMarkupHandler.scala b/src/library/scala/xml/parsing/DefaultMarkupHandler.scala index 69c59c30cf..0a8bd7c4d6 100644 --- a/src/library/scala/xml/parsing/DefaultMarkupHandler.scala +++ b/src/library/scala/xml/parsing/DefaultMarkupHandler.scala @@ -13,7 +13,7 @@ package scala.xml package parsing -/** default implemenation of markup handler always returns NodeSeq.Empty */ +/** default implementation of markup handler always returns NodeSeq.Empty */ abstract class DefaultMarkupHandler extends MarkupHandler { def elem(pos: Int, pre: String, label: String, attrs: MetaData, diff --git a/src/library/scala/xml/parsing/MarkupHandler.scala b/src/library/scala/xml/parsing/MarkupHandler.scala index 75c7958c38..bcb0e03a07 100644 --- a/src/library/scala/xml/parsing/MarkupHandler.scala +++ b/src/library/scala/xml/parsing/MarkupHandler.scala @@ -70,7 +70,7 @@ abstract class MarkupHandler extends Logged */ def elemEnd(pos: Int, pre: String, label: String): Unit = () - /** callback method invoked by MarkupParser after parsing an elementm, + /** callback method invoked by MarkupParser after parsing an element, * between the elemStart and elemEnd callbacks * * @param pos the position in the source file diff --git a/src/library/scala/xml/parsing/MarkupParser.scala b/src/library/scala/xml/parsing/MarkupParser.scala index 38ae4a47fb..24e0d78c6f 100644 --- a/src/library/scala/xml/parsing/MarkupParser.scala +++ b/src/library/scala/xml/parsing/MarkupParser.scala @@ -208,7 +208,7 @@ trait MarkupParser extends MarkupParserCommon with TokenTests case _:ProcInstr => ; case _:Comment => ; case _:EntityRef => // todo: fix entities, shouldn't be "special" - reportSyntaxError("no entity references alllowed here"); + reportSyntaxError("no entity references allowed here"); case s:SpecialNode => if (s.toString().trim().length > 0) //non-empty text nodes not allowed elemCount = elemCount + 2; diff --git a/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java b/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java index b136f9423e..0a9ef6929e 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java +++ b/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java @@ -55,7 +55,7 @@ public class Attribute { return value; } - /**@return an array with the arguments to the attribute's contructor. */ + /**@return an array with the arguments to the attribute's constructor. */ public Object[] getConstructorArguments() { parseBlob(); Object[] cas = new Object[constrArgs.length]; diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala index 4644cade72..0e0e337ceb 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/ILPrinterVisitor.scala @@ -20,7 +20,7 @@ import ch.epfl.lamp.compiler.msil._ import ch.epfl.lamp.compiler.msil.util.Table /** - * The MSIL printer Vistor. It prints a complete + * The MSIL printer Visitor. It prints a complete * assembly in a single or multiple files. Then this file can be compiled by ilasm. * * @author Nikolay Mihaylov diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala index eb86c96de5..a1c5091547 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/MethodBuilder.scala @@ -40,7 +40,7 @@ class MethodBuilder(name: String, declType: Type, attrs: Int, returnType: Type, def GetILGenerator(): ILGenerator = { if (ilGenerator == null) throw new RuntimeException - ("No code generator avaiable for this method: " + this) + ("No code generator available for this method: " + this) return ilGenerator } diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala index 63776cc084..b1b6d41eb5 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/MultipleFilesILPrinterVisitor.scala @@ -20,8 +20,8 @@ import ch.epfl.lamp.compiler.msil.emit import ch.epfl.lamp.compiler.msil.util.Table /** - * The MSIL printer Vistor. It prints a complete - * assembly into seperate files. Then these files can be compiled by ilasm. + * The MSIL printer Visitor. It prints a complete + * assembly into separate files. Then these files can be compiled by ilasm. * * @author Nikolay Mihaylov * @author Daniel Lorch diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala index 1bd8e48633..835bdcadd0 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCode.scala @@ -1139,7 +1139,7 @@ object OpCode { opcode(Rem_Un, CEE_REM_UN, "rem.un" , 0xFFFFFF5E, POP_1_1, PUSH_1 , INLINE_NONE, FLOW_NEXT) /** - * Computes the bitwise AND of two values and pushes the result onto the evalution stack. + * Computes the bitwise AND of two values and pushes the result onto the evaluation stack. */ final val And = new OpCode() opcode(And, CEE_AND, "and" , 0xFFFFFF5F, POP_1_1, PUSH_1 , INLINE_NONE, FLOW_NEXT) @@ -1585,7 +1585,7 @@ object OpCode { opcode(Conv_Ovf_I2, CEE_CONV_OVF_I2, "conv.ovf.i2", 0xFFFFFFB5, POP_1, PUSH_I , INLINE_NONE , FLOW_NEXT) /** - * Converts the signed value on top of the sevaluation tack to signed int32, + * Converts the signed value on top of the evaluation stack to signed int32, * throwing OverflowException on overflow. */ final val Conv_Ovf_I4 = new OpCode() diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala index f8e0f140a8..557b022f54 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/OpCodes.scala @@ -521,7 +521,7 @@ object OpCodes { final val Rem_Un = OpCode.Rem_Un /** - * Computes the bitwise AND of two values and pushes the result onto the evalution stack. + * Computes the bitwise AND of two values and pushes the result onto the evaluation stack. */ final val And = OpCode.And @@ -899,7 +899,7 @@ object OpCodes { final val Conv_Ovf_I2 = OpCode.Conv_Ovf_I2 /** - * Converts the signed value on top of the sevaluation tack to signed int32, + * Converts the signed value on top of the evaluation stack to signed int32, * throwing OverflowException on overflow. */ final val Conv_Ovf_I4 = OpCode.Conv_Ovf_I4 diff --git a/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala b/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala index 5ebc5ea32f..7a880f2ac6 100644 --- a/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala +++ b/src/msil/ch/epfl/lamp/compiler/msil/emit/SingleFileILPrinterVisitor.scala @@ -19,7 +19,7 @@ import ch.epfl.lamp.compiler.msil.emit import ch.epfl.lamp.compiler.msil.util.Table /** - * The MSIL printer Vistor. It prints a complete + * The MSIL printer Visitor. It prints a complete * assembly in a single file. Then this file can be compiled by ilasm. * * @author Nikolay Mihaylov diff --git a/src/scalap/scala/tools/scalap/scalax/rules/Functors.scala b/src/scalap/scala/tools/scalap/scalax/rules/Functors.scala index aa95b48d44..aa852c1e63 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/Functors.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/Functors.scala @@ -60,7 +60,7 @@ trait Functors { } } -/** One of the 'unit' definitions must be overriden in concrete subclasses */ +/** One of the 'unit' definitions must be overridden in concrete subclasses */ trait UnitFunctors extends Units with Functors { def unit : M[Unit] = unit(()) def unit[A](a : => A) : M[A] = unit map { Unit => a } @@ -73,7 +73,7 @@ trait Monoidals extends UnitFunctors { implicit def app[A, B](fab : M[A => B]) = (fa : M[A]) => fa applyTo fab implicit def appUnit[A, B](a2b : A => B) = app(unit(a2b)) - /** One of 'and' and 'applyTo' definitions must be overriden in concrete subclasses */ + /** One of 'and' and 'applyTo' definitions must be overridden in concrete subclasses */ trait Monoidal[+A] extends Functor[A] { self : M[A] => def and[B](fb : => M[B]) : M[(A, B)] = ((a : A) => (b : B) => (a, b))(this)(fb) def applyTo[B](fab : M[A => B]) : M[B] = fab and this map { case (f, a) => f(a) } diff --git a/src/scalap/scala/tools/scalap/scalax/rules/Rules.scala b/src/scalap/scala/tools/scalap/scalax/rules/Rules.scala index 4e8ddc8dbe..43f9c20b1d 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/Rules.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/Rules.scala @@ -98,7 +98,7 @@ trait StateRules { def nil = unit(Nil) def none = unit(None) - /** Create a rule that suceeds if f(in) is true. */ + /** Create a rule that identities if f(in) is true. */ def cond(f : S => Boolean) = get filter f /** Create a rule that succeeds if all of the given rules succeed. diff --git a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala index 31bbfa16af..26b01634f5 100644 --- a/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala +++ b/src/scalap/scala/tools/scalap/scalax/rules/scalasig/ScalaSigPrinter.scala @@ -205,7 +205,7 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) { case _ => "^___^" }) - // Printe parameter clauses + // Print parameter clauses print(paramEntries.mkString( "(" + (mt match {case _: ImplicitMethodType => "implicit "; case _ => ""}) , ", ", ")")) @@ -261,7 +261,7 @@ class ScalaSigPrinter(stream: PrintStream, printPrivates: Boolean) { val nn = processName(name) print(nn) printMethodType(m.infoType, true)( - {if (!m.isDeferred) print(" = { /* compiled code */ }" /* Print body only for non-abstract metods */ )} + {if (!m.isDeferred) print(" = { /* compiled code */ }" /* Print body only for non-abstract methods */ )} ) } print("\n") diff --git a/src/swing/scala/swing/SimpleGUIApplication.scala b/src/swing/scala/swing/SimpleGUIApplication.scala index 79eb3cd2b4..e26a0263f8 100644 --- a/src/swing/scala/swing/SimpleGUIApplication.scala +++ b/src/swing/scala/swing/SimpleGUIApplication.scala @@ -15,12 +15,12 @@ import javax.swing._ /** * Extend this class for most simple UI applications. Clients need to implement the - *top
method. Framework intialization is done by this class.
+ * top
method. Framework initialization is done by this class.
*
* In order to conform to Swing's threading policy, never implement top or any additional
* member that created Swing components as a value unless component creation happens on
* the EDT (see Swing.onEDT and Swing.onEDTWait). Lazy values are okay for the same reason
- * if they are intialized on the EDT always.
+ * if they are initialized on the EDT always.
*/
@deprecated("Use SimpleSwingApplication instead") abstract class SimpleGUIApplication extends GUIApplication {
diff --git a/src/swing/scala/swing/event/TableEvent.scala b/src/swing/scala/swing/event/TableEvent.scala
index 9e5a05629b..e12322fa18 100644
--- a/src/swing/scala/swing/event/TableEvent.scala
+++ b/src/swing/scala/swing/event/TableEvent.scala
@@ -18,7 +18,7 @@ abstract class TableChange(override val source: Table) extends TableEvent(source
/**
* The most general table change. The table might have changed completely,
- * i.e., comlumns might have been reordered, rows added or removed, etc.
+ * i.e., columns might have been reordered, rows added or removed, etc.
* No other event indicates that the structure might have changed.
*/
case class TableStructureChanged(override val source: Table) extends TableChange(source)
diff --git a/test/files/buildmanager/t2556_3/t2556_3.check b/test/files/buildmanager/t2556_3/t2556_3.check
index c59e4fe09d..af0c63eebc 100644
--- a/test/files/buildmanager/t2556_3/t2556_3.check
+++ b/test/files/buildmanager/t2556_3/t2556_3.check
@@ -5,7 +5,7 @@ builder > A.scala
compiling Set(A.scala)
Changes: Map(class A -> List(), class B -> List(Changed(Class(B))[List((A,java.lang.Object), (ScalaObject,ScalaObject))]))
invalidate C.scala because parents have changed [Changed(Class(B))[List((A,java.lang.Object), (ScalaObject,ScalaObject))]]
-invalidate B.scala because it references invalid (no longer inherited) defintion [ParentChanged(Class(C))]
+invalidate B.scala because it references invalid (no longer inherited) definition [ParentChanged(Class(C))]
compiling Set(B.scala, C.scala)
B.scala:3: error: type mismatch;
found : C
diff --git a/test/files/neg/t0528neg.scala b/test/files/neg/t0528neg.scala
index 911745b763..30d20c95b1 100644
--- a/test/files/neg/t0528neg.scala
+++ b/test/files/neg/t0528neg.scala
@@ -3,7 +3,7 @@ trait Sequ[+A] {
}
class RichStr extends Sequ[Char] {
- // override to a primitve array
+ // override to a primitive array
def toArray: Array[Char] = new Array[Char](10)
}
diff --git a/test/files/pos/spec-List.scala b/test/files/pos/spec-List.scala
index e49391f0e4..c5bc3aa5fd 100644
--- a/test/files/pos/spec-List.scala
+++ b/test/files/pos/spec-List.scala
@@ -648,7 +648,7 @@ object List extends SeqFactory[List] {
*
* @param arr the array to convert
* @param start the first index to consider
- * @param len the lenght of the range to convert
+ * @param len the length of the range to convert
* @return a list that contains the same elements than arr
* in the same order
*/
diff --git a/test/files/pos/t1164.scala b/test/files/pos/t1164.scala
index b238bf54d9..ca780c9a26 100644
--- a/test/files/pos/t1164.scala
+++ b/test/files/pos/t1164.scala
@@ -12,7 +12,7 @@ object test {
def matchAndGetArgFromFoo[a]( e:Foo[a]):a = {e match { case Foo(x) => x }}
- // Try the same thing as above but use function as arguemnt to Bar
+ // Try the same thing as above but use function as argument to Bar
// constructor
type FunIntToA [a] = (Int) => a
diff --git a/test/files/pos/t1756.scala b/test/files/pos/t1756.scala
index 4f7202114c..d5d3ddc624 100755
--- a/test/files/pos/t1756.scala
+++ b/test/files/pos/t1756.scala
@@ -15,7 +15,7 @@ expected type from x+, because the lhs x is still typed as a Poly[A].
This means that the argument of the implicit conversion is typechecked
with expected type A with Poly[A]. And no solution is found.
-To solve this, I added a fallback scheme similar to implicit arguents:
+To solve this, I added a fallback scheme similar to implicit arguments:
When an implicit view that adds a method matching given arguments and result
type fails, try again without the result type.
*/
diff --git a/test/files/run/t0528.scala b/test/files/run/t0528.scala
index 5a4755c947..df6d13a17a 100644
--- a/test/files/run/t0528.scala
+++ b/test/files/run/t0528.scala
@@ -3,7 +3,7 @@ trait Sequ[A] {
}
class RichStr extends Sequ[Char] {
- // override to a primitve array
+ // override to a primitive array
def toArray: Array[Char] = Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9')
}
diff --git a/test/files/run/t2526.scala b/test/files/run/t2526.scala
index 235aca234d..53f3059135 100644
--- a/test/files/run/t2526.scala
+++ b/test/files/run/t2526.scala
@@ -38,7 +38,7 @@ object Test {
/*
* Checks foreach of `actual` goes over all the elements in `expected`
- * We duplicate the method above because there is no common inteface between Traverable and
+ * We duplicate the method above because there is no common inteface between Traversable and
* Iterator and we want to avoid converting between collections to ensure that we test what
* we mean to test.
*/
diff --git a/test/pending/pos/t0644.scala b/test/pending/pos/t0644.scala
deleted file mode 100644
index 5ad12c3632..0000000000
--- a/test/pending/pos/t0644.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-class A {
- def appply(): Int = 0
- def update(n: Int) {}
-}
-
-class B extends A {
- this()
- this()=1
- super()
- super()=1
-}
--
cgit v1.2.3