summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-04-06 01:26:31 +0000
committerPaul Phillips <paulp@improving.org>2010-04-06 01:26:31 +0000
commitf578ff88d2514bf94c46cfb8c0e33236c2b2fcf1 (patch)
tree79de21d09f14420748c6426f50e7fc636ae7b33f /src/compiler
parent3b8ee6d4a95eb417b9e4eb944afb8d36bc913e18 (diff)
downloadscala-f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1.tar.gz
scala-f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1.tar.bz2
scala-f578ff88d2514bf94c46cfb8c0e33236c2b2fcf1.zip
As a brief diversion from real work, implemente...
As a brief diversion from real work, implemented Damerau–Levenshtein and ran it on trunk to elicit obvious misspellings. Unfortunately they're mostly in places like compiler comments which real people never see, but I fixed them anyway. All those English Lit majors who peruse our sources are sure to be pleased. No review.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/ant/Pack200Task.scala2
-rw-r--r--src/compiler/scala/tools/ant/ScalaTool.scala2
-rw-r--r--src/compiler/scala/tools/ant/sabbus/Use.scala2
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala4
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala2
-rw-r--r--src/compiler/scala/tools/nsc/PhaseAssembly.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ScriptRunner.scala2
-rwxr-xr-xsrc/compiler/scala/tools/nsc/ast/DocComments.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/NodePrinters.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Parsers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/Scanners.scala2
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala4
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/BasicBlocks.scala6
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/Checkers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala8
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala6
-rw-r--r--src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala12
-rw-r--r--src/compiler/scala/tools/nsc/backend/opt/ClosureElimination.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/opt/Inliners.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/page/Source.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala2
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala2
-rw-r--r--src/compiler/scala/tools/nsc/interactive/CompilerControl.scala2
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala4
-rw-r--r--src/compiler/scala/tools/nsc/interactive/RangePositions.scala2
-rw-r--r--src/compiler/scala/tools/nsc/interactive/RefinedBuildManager.scala4
-rw-r--r--src/compiler/scala/tools/nsc/interpreter/InteractiveReader.scala2
-rw-r--r--src/compiler/scala/tools/nsc/io/File.scala2
-rw-r--r--src/compiler/scala/tools/nsc/plugins/Plugins.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/AnnotationInfos.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Positions.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Scopes.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Symbols.scala14
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala16
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala6
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/AddInterfaces.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/CleanUp.scala6
-rw-r--r--src/compiler/scala/tools/nsc/transform/Constructors.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/Erasure.scala4
-rw-r--r--src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/LambdaLift.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/LazyVals.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/Mixin.scala8
-rw-r--r--src/compiler/scala/tools/nsc/transform/OverridingPairs.scala14
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala22
-rw-r--r--src/compiler/scala/tools/nsc/transform/TailCalls.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/TypingTransformers.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala6
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/DeVirtualize.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala6
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala10
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala10
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala18
-rwxr-xr-xsrc/compiler/scala/tools/nsc/util/DocStrings.scala2
-rw-r--r--src/compiler/scala/tools/util/PathResolver.scala2
65 files changed, 141 insertions, 141 deletions
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 &lt;lhs = rhs&gt; */
+ /** Create a tree representing an assignment &lt;lhs = rhs&gt; */
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 {