Skip to content
This repository was archived by the owner on Sep 1, 2020. It is now read-only.

Commit 62e915d

Browse files
committed
Merge pull request scala#4631 from janekdb/2.11.x-typos-t-v
Fix 23 typos (t-v)
2 parents aed140b + 3819d0c commit 62e915d

File tree

19 files changed

+23
-23
lines changed

19 files changed

+23
-23
lines changed

src/compiler/scala/tools/ant/Scalac.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
131131
/** The character encoding of the files to compile. */
132132
protected var encoding: Option[String] = None
133133

134-
// the targetted backend
134+
// the targeted backend
135135
protected var backend: Option[String] = None
136136

137137
/** Whether to force compilation of all files or not. */

src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ final class BCodeAsmCommon[G <: Global](val global: G) {
289289
lazy val AnnotationRetentionPolicyRuntimeValue = AnnotationRetentionPolicyModule.tpe.member(TermName("RUNTIME"))
290290

291291
/** Whether an annotation should be emitted as a Java annotation
292-
* .initialize: if 'annot' is read from pickle, atp might be un-initialized
292+
* .initialize: if 'annot' is read from pickle, atp might be uninitialized
293293
*/
294294
def shouldEmitAnnotation(annot: AnnotationInfo) = {
295295
annot.symbol.initialize.isJavaDefined &&

src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import scala.tools.nsc.backend.jvm.opt.BytecodeUtils._
3131
* catch block, and the recursive invocation is not necessary.
3232
*
3333
* simplify jumps
34-
* - various simplifications, see doc domments of individual optimizations
34+
* - various simplifications, see doc comments of individual optimizations
3535
* + changing or eliminating jumps may render some code unreachable, therefore "simplify jumps" is
3636
* executed in a loop with "unreachable code"
3737
*
@@ -495,7 +495,7 @@ object LocalOptImpls {
495495
* Replace jumps to a sequence of GOTO instructions by a jump to the final destination.
496496
*
497497
* Jump l; [any ops]; l: GOTO m; [any ops]; m: GOTO n; [any ops]; n: NotGOTO; [...]
498-
* => Jump n; [rest unchaned]
498+
* => Jump n; [rest unchanged]
499499
*
500500
* If there's a loop of GOTOs, the initial jump is replaced by one of the labels in the loop.
501501
*/

src/compiler/scala/tools/nsc/transform/LazyVals.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ abstract class LazyVals extends Transform with TypingTransformers with ast.TreeD
168168
/** Add the bitmap definitions to the rhs of a method definition.
169169
* If the rhs has been tail-call transformed, insert the bitmap
170170
* definitions inside the top-level label definition, so that each
171-
* iteration has the lazy values un-initialized. Otherwise add them
171+
* iteration has the lazy values uninitialized. Otherwise add them
172172
* at the very beginning of the method.
173173
*/
174174
private def addBitmapDefs(methSym: Symbol, rhs: Tree): Tree = {

src/compiler/scala/tools/nsc/transform/Mixin.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL {
7979

8080
/** Does this field require an initialized bit?
8181
* Note: fields of classes inheriting DelayedInit are not checked.
82-
* This is because the they are neither initialized in the constructor
82+
* This is because they are neither initialized in the constructor
8383
* nor do they have a setter (not if they are vals anyway). The usual
84-
* logic for setting bitmaps does therefor not work for such fields.
84+
* logic for setting bitmaps does therefore not work for such fields.
8585
* That's why they are excluded.
8686
* Note: The `checkinit` option does not check if transient fields are initialized.
8787
*/

src/compiler/scala/tools/nsc/transform/UnCurry.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ abstract class UnCurry extends InfoTransform
433433

434434
val sym = tree.symbol
435435

436-
// true if the taget is a lambda body that's been lifted into a method
436+
// true if the target is a lambda body that's been lifted into a method
437437
def isLiftedLambdaBody(target: Tree) = target.symbol.isLocalToBlock && target.symbol.isArtifact && target.symbol.name.containsName(nme.ANON_FUN_NAME)
438438

439439
val result = (

src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ trait MatchCodeGen extends Interface {
134134
trait OptimizedCodegen extends CodegenCore with TypedSubstitution with MatchMonadInterface {
135135
override def codegen: AbsCodegen = optimizedCodegen
136136

137-
// when we know we're targetting Option, do some inlining the optimizer won't do
137+
// when we know we're targeting Option, do some inlining the optimizer won't do
138138
// for example, `o.flatMap(f)` becomes `if(o == None) None else f(o.get)`, similarly for orElse and guard
139139
// this is a special instance of the advanced inlining optimization that takes a method call on
140140
// an object of a type that only has two concrete subclasses, and inlines both bodies, guarded by an if to distinguish the two cases

src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ trait MatchOptimization extends MatchTreeMaking with MatchAnalysis {
286286
else Apply(Ident(defaultLabel), Nil)
287287

288288
val guardedBody = same.foldRight(jumpToDefault){
289-
// the last case may be un-guarded (we know it's the last one since fold's accum == jumpToDefault)
290-
// --> replace jumpToDefault by the un-guarded case's body
289+
// the last case may be unguarded (we know it's the last one since fold's accum == jumpToDefault)
290+
// --> replace jumpToDefault by the unguarded case's body
291291
case (CaseDef(_, EmptyTree, b), `jumpToDefault`) => b
292292
case (cd@CaseDef(_, g, b), els) if isGuardedCase(cd) => If(g, b, els)
293293
}
@@ -322,7 +322,7 @@ trait MatchOptimization extends MatchTreeMaking with MatchAnalysis {
322322
var remainingCases = cases
323323
val collapsed = scala.collection.mutable.ListBuffer.empty[CaseDef]
324324

325-
// when some of collapsed cases (except for the default case itself) did not include an un-guarded case
325+
// when some of collapsed cases (except for the default case itself) did not include an unguarded case
326326
// we'll need to emit a labeldef for the default case
327327
var needDefault = false
328328

src/compiler/scala/tools/nsc/typechecker/Infer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ trait Infer extends Checkable {
11171117

11181118
// this is quite nasty: it destructively changes the info of the syms of e.g., method type params
11191119
// (see #3692, where the type param T's bounds were set to > : T <: T, so that parts looped)
1120-
// the changes are rolled back by restoreTypeBounds, but might be unintentially observed in the mean time
1120+
// the changes are rolled back by restoreTypeBounds, but might be unintentionally observed in the mean time
11211121
def instantiateTypeVar(tvar: TypeVar) {
11221122
val tparam = tvar.origin.typeSymbol
11231123
val TypeBounds(lo0, hi0) = tparam.info.bounds

src/reflect/scala/reflect/internal/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
11531153
* phase check (if after flatten) in the (overridden) method "def owner" in
11541154
* ModuleSymbol / ClassSymbol. The `rawowner` field is not modified.
11551155
* - Owners are also changed in other situations, for example when moving trees into a new
1156-
* lexical context, e.g. in the named/default arguments tranformation, or when translating
1156+
* lexical context, e.g. in the named/default arguments transformation, or when translating
11571157
* extension method definitions.
11581158
*
11591159
* In general when seeking the owner of a symbol, one should call `owner`.

src/reflect/scala/reflect/internal/tpe/TypeMaps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ private[internal] trait TypeMaps {
736736
substFor(sym)
737737
case ClassInfoType(parents, decls, sym) =>
738738
val parents1 = parents mapConserve this
739-
// We don't touch decls here; they will be touched when an enclosing TreeSubstitutor
739+
// We don't touch decls here; they will be touched when an enclosing TreeSubstituter
740740
// transforms the tree that defines them.
741741
if (parents1 eq parents) tp
742742
else ClassInfoType(parents1, decls, sym)

src/reflect/scala/reflect/internal/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ trait Erasure {
9090
}
9191
}
9292

93-
/** Does this vakue class have an underlying type that's a type parameter of
93+
/** Does this value class have an underlying type that's a type parameter of
9494
* the class itself?
9595
* This method needs to be called at a phase no later than erasurephase
9696
*/

src/scaladoc/scala/tools/nsc/doc/model/CommentFactory.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ trait CommentFactory extends base.CommentFactoryBase {
3131
defineComment(sym, linkTarget, inTpl)
3232
})
3333

34-
/** A comment is usualy created by the parser, however for some special
34+
/** A comment is usually created by the parser, however for some special
3535
* cases we have to give some `inTpl` comments (parent class for example)
3636
* to the comment of the symbol.
3737
* This function manages some of those cases : Param accessor and Primary constructor */

src/scaladoc/scala/tools/nsc/doc/model/diagram/Diagram.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ case class NormalNode(tpe: TypeEntity, tpl: Option[TemplateEntity])(val tooltip:
9999

100100
/** A class or trait the thisnode can be converted to by an implicit conversion
101101
* TODO: I think it makes more sense to use the tpe links to templates instead of the TemplateEntity for implicit nodes
102-
* since some implicit conversions convert the class to complex types that cannot be represented as a single tmeplate
102+
* since some implicit conversions convert the class to complex types that cannot be represented as a single template
103103
*/
104104
case class ImplicitNode(tpe: TypeEntity, tpl: Option[TemplateEntity])(val tooltip: Option[String] = None) extends Node { override def isImplicitNode = true }
105105

test/files/neg/t7214neg.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// pattern matcher crashes here trying to synthesize an uneeded outer test.
1+
// pattern matcher crashes here trying to synthesize an unneeded outer test.
22
// no-symbol does not have an owner
33
// at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:49)
44
// at scala.tools.nsc.Global.abort(Global.scala:253)

test/files/pos/t6089b.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// this crazy code simply tries to nest pattern matches so that the last call is in a tricky-to-determine
2-
// tail position (my initial tightenign of tailpos detection for SI-6089 ruled this out)
2+
// tail position (my initial tightening of tailpos detection for SI-6089 ruled this out)
33
class BKTree {
44
@annotation.tailrec
55
final def -?-[AA](a: AA): Boolean = this match {

test/files/pos/t7689.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ object A {
22
// The default getter must have an explicit return type (List[_] => Int)
33
// This wasn't happening since e28c3edda4. That commit encoded upper/lower
44
// bounds of Any/Nothing as EmptyTree, which were triggering an .isEmpty
5-
// check in Namers#TypeTreeSubstitutor
5+
// check in Namers#TypeTreeSubstituter
66
def x(f: List[_] => Int = _ => 3) = 9
77
}

test/files/run/t2127.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
2929
}
3030
31-
The constructor invocation of Bar is done within the scope of object Foo's constructor, and therefor the private constructor of Foo should be visible and accessible.
31+
The constructor invocation of Bar is done within the scope of object Foo's constructor, and therefore the private constructor of Foo should be visible and accessible.
3232
*/

test/files/run/t7214.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// pattern matcher crashes here trying to synthesize an uneeded outer test.
1+
// pattern matcher crashes here trying to synthesize an unneeded outer test.
22
// no-symbol does not have an owner
33
// at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:49)
44
// at scala.tools.nsc.Global.abort(Global.scala:253)

0 commit comments

Comments
 (0)