From 3819d0c20084997ad56432f3475fbe4adeb9d6d4 Mon Sep 17 00:00:00 2001 From: Janek Bogucki Date: Wed, 15 Jul 2015 10:59:16 +0100 Subject: Fix 23 typos (t-v) --- src/compiler/scala/tools/ant/Scalac.scala | 2 +- src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala | 2 +- src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala | 4 ++-- src/compiler/scala/tools/nsc/transform/LazyVals.scala | 2 +- src/compiler/scala/tools/nsc/transform/Mixin.scala | 4 ++-- src/compiler/scala/tools/nsc/transform/UnCurry.scala | 2 +- src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala | 2 +- .../scala/tools/nsc/transform/patmat/MatchOptimization.scala | 6 +++--- src/compiler/scala/tools/nsc/typechecker/Infer.scala | 2 +- src/reflect/scala/reflect/internal/Symbols.scala | 2 +- src/reflect/scala/reflect/internal/tpe/TypeMaps.scala | 2 +- src/reflect/scala/reflect/internal/transform/Erasure.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/model/CommentFactory.scala | 2 +- src/scaladoc/scala/tools/nsc/doc/model/diagram/Diagram.scala | 2 +- test/files/neg/t7214neg.scala | 2 +- test/files/pos/t6089b.scala | 2 +- test/files/pos/t7689.scala | 2 +- test/files/run/t2127.scala | 2 +- test/files/run/t7214.scala | 2 +- 19 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/compiler/scala/tools/ant/Scalac.scala b/src/compiler/scala/tools/ant/Scalac.scala index 13bf0ef4c6..f46f014096 100644 --- a/src/compiler/scala/tools/ant/Scalac.scala +++ b/src/compiler/scala/tools/ant/Scalac.scala @@ -131,7 +131,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared { /** The character encoding of the files to compile. */ protected var encoding: Option[String] = None - // the targetted backend + // the targeted backend protected var backend: Option[String] = None /** Whether to force compilation of all files or not. */ diff --git a/src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala b/src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala index dec5adc9aa..daa31c5dfe 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala @@ -289,7 +289,7 @@ final class BCodeAsmCommon[G <: Global](val global: G) { lazy val AnnotationRetentionPolicyRuntimeValue = AnnotationRetentionPolicyModule.tpe.member(TermName("RUNTIME")) /** Whether an annotation should be emitted as a Java annotation - * .initialize: if 'annot' is read from pickle, atp might be un-initialized + * .initialize: if 'annot' is read from pickle, atp might be uninitialized */ def shouldEmitAnnotation(annot: AnnotationInfo) = { annot.symbol.initialize.isJavaDefined && diff --git a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala index bd5bab28b5..4132710a96 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/opt/LocalOpt.scala @@ -31,7 +31,7 @@ import scala.tools.nsc.backend.jvm.opt.BytecodeUtils._ * catch block, and the recursive invocation is not necessary. * * simplify jumps - * - various simplifications, see doc domments of individual optimizations + * - various simplifications, see doc comments of individual optimizations * + changing or eliminating jumps may render some code unreachable, therefore "simplify jumps" is * executed in a loop with "unreachable code" * @@ -495,7 +495,7 @@ object LocalOptImpls { * Replace jumps to a sequence of GOTO instructions by a jump to the final destination. * * Jump l; [any ops]; l: GOTO m; [any ops]; m: GOTO n; [any ops]; n: NotGOTO; [...] - * => Jump n; [rest unchaned] + * => Jump n; [rest unchanged] * * If there's a loop of GOTOs, the initial jump is replaced by one of the labels in the loop. */ diff --git a/src/compiler/scala/tools/nsc/transform/LazyVals.scala b/src/compiler/scala/tools/nsc/transform/LazyVals.scala index df622d4d1d..b6695efb0b 100644 --- a/src/compiler/scala/tools/nsc/transform/LazyVals.scala +++ b/src/compiler/scala/tools/nsc/transform/LazyVals.scala @@ -168,7 +168,7 @@ abstract class LazyVals extends Transform with TypingTransformers with ast.TreeD /** Add the bitmap definitions to the rhs of a method definition. * If the rhs has been tail-call transformed, insert the bitmap * definitions inside the top-level label definition, so that each - * iteration has the lazy values un-initialized. Otherwise add them + * iteration has the lazy values uninitialized. Otherwise add them * at the very beginning of the method. */ private def addBitmapDefs(methSym: Symbol, rhs: Tree): Tree = { diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala index 11f9483f77..25d45cc819 100644 --- a/src/compiler/scala/tools/nsc/transform/Mixin.scala +++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala @@ -79,9 +79,9 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL { /** Does this field require an initialized bit? * Note: fields of classes inheriting DelayedInit are not checked. - * This is because the they are neither initialized in the constructor + * This is because they are neither initialized in the constructor * nor do they have a setter (not if they are vals anyway). The usual - * logic for setting bitmaps does therefor not work for such fields. + * logic for setting bitmaps does therefore not work for such fields. * That's why they are excluded. * Note: The `checkinit` option does not check if transient fields are initialized. */ diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index b310e6c3a1..7a9dfda43e 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -433,7 +433,7 @@ abstract class UnCurry extends InfoTransform val sym = tree.symbol - // true if the taget is a lambda body that's been lifted into a method + // true if the target is a lambda body that's been lifted into a method def isLiftedLambdaBody(target: Tree) = target.symbol.isLocalToBlock && target.symbol.isArtifact && target.symbol.name.containsName(nme.ANON_FUN_NAME) val result = ( diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala index 06b39b035a..1642613b9b 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchCodeGen.scala @@ -134,7 +134,7 @@ trait MatchCodeGen extends Interface { trait OptimizedCodegen extends CodegenCore with TypedSubstitution with MatchMonadInterface { override def codegen: AbsCodegen = optimizedCodegen - // when we know we're targetting Option, do some inlining the optimizer won't do + // when we know we're targeting Option, do some inlining the optimizer won't do // for example, `o.flatMap(f)` becomes `if(o == None) None else f(o.get)`, similarly for orElse and guard // this is a special instance of the advanced inlining optimization that takes a method call on // an object of a type that only has two concrete subclasses, and inlines both bodies, guarded by an if to distinguish the two cases diff --git a/src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala b/src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala index b3aef8a20e..cca8d2dbb8 100644 --- a/src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala +++ b/src/compiler/scala/tools/nsc/transform/patmat/MatchOptimization.scala @@ -286,8 +286,8 @@ trait MatchOptimization extends MatchTreeMaking with MatchAnalysis { else Apply(Ident(defaultLabel), Nil) val guardedBody = same.foldRight(jumpToDefault){ - // the last case may be un-guarded (we know it's the last one since fold's accum == jumpToDefault) - // --> replace jumpToDefault by the un-guarded case's body + // the last case may be unguarded (we know it's the last one since fold's accum == jumpToDefault) + // --> replace jumpToDefault by the unguarded case's body case (CaseDef(_, EmptyTree, b), `jumpToDefault`) => b case (cd@CaseDef(_, g, b), els) if isGuardedCase(cd) => If(g, b, els) } @@ -322,7 +322,7 @@ trait MatchOptimization extends MatchTreeMaking with MatchAnalysis { var remainingCases = cases val collapsed = scala.collection.mutable.ListBuffer.empty[CaseDef] - // when some of collapsed cases (except for the default case itself) did not include an un-guarded case + // when some of collapsed cases (except for the default case itself) did not include an unguarded case // we'll need to emit a labeldef for the default case var needDefault = false diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index ea0a9bb243..ab9fa26bac 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -1117,7 +1117,7 @@ trait Infer extends Checkable { // this is quite nasty: it destructively changes the info of the syms of e.g., method type params // (see #3692, where the type param T's bounds were set to > : T <: T, so that parts looped) - // the changes are rolled back by restoreTypeBounds, but might be unintentially observed in the mean time + // the changes are rolled back by restoreTypeBounds, but might be unintentionally observed in the mean time def instantiateTypeVar(tvar: TypeVar) { val tparam = tvar.origin.typeSymbol val TypeBounds(lo0, hi0) = tparam.info.bounds diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala index 285d59c5e2..01be52eac0 100644 --- a/src/reflect/scala/reflect/internal/Symbols.scala +++ b/src/reflect/scala/reflect/internal/Symbols.scala @@ -1153,7 +1153,7 @@ trait Symbols extends api.Symbols { self: SymbolTable => * phase check (if after flatten) in the (overridden) method "def owner" in * ModuleSymbol / ClassSymbol. The `rawowner` field is not modified. * - Owners are also changed in other situations, for example when moving trees into a new - * lexical context, e.g. in the named/default arguments tranformation, or when translating + * lexical context, e.g. in the named/default arguments transformation, or when translating * extension method definitions. * * In general when seeking the owner of a symbol, one should call `owner`. diff --git a/src/reflect/scala/reflect/internal/tpe/TypeMaps.scala b/src/reflect/scala/reflect/internal/tpe/TypeMaps.scala index 15a87200f1..817c9706b4 100644 --- a/src/reflect/scala/reflect/internal/tpe/TypeMaps.scala +++ b/src/reflect/scala/reflect/internal/tpe/TypeMaps.scala @@ -736,7 +736,7 @@ private[internal] trait TypeMaps { substFor(sym) case ClassInfoType(parents, decls, sym) => val parents1 = parents mapConserve this - // We don't touch decls here; they will be touched when an enclosing TreeSubstitutor + // We don't touch decls here; they will be touched when an enclosing TreeSubstituter // transforms the tree that defines them. if (parents1 eq parents) tp else ClassInfoType(parents1, decls, sym) diff --git a/src/reflect/scala/reflect/internal/transform/Erasure.scala b/src/reflect/scala/reflect/internal/transform/Erasure.scala index 707972242a..01e28e5642 100644 --- a/src/reflect/scala/reflect/internal/transform/Erasure.scala +++ b/src/reflect/scala/reflect/internal/transform/Erasure.scala @@ -90,7 +90,7 @@ trait Erasure { } } - /** Does this vakue class have an underlying type that's a type parameter of + /** Does this value class have an underlying type that's a type parameter of * the class itself? * This method needs to be called at a phase no later than erasurephase */ diff --git a/src/scaladoc/scala/tools/nsc/doc/model/CommentFactory.scala b/src/scaladoc/scala/tools/nsc/doc/model/CommentFactory.scala index fe157c1cc9..66ce2137f2 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/CommentFactory.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/CommentFactory.scala @@ -31,7 +31,7 @@ trait CommentFactory extends base.CommentFactoryBase { defineComment(sym, linkTarget, inTpl) }) - /** A comment is usualy created by the parser, however for some special + /** A comment is usually created by the parser, however for some special * cases we have to give some `inTpl` comments (parent class for example) * to the comment of the symbol. * This function manages some of those cases : Param accessor and Primary constructor */ diff --git a/src/scaladoc/scala/tools/nsc/doc/model/diagram/Diagram.scala b/src/scaladoc/scala/tools/nsc/doc/model/diagram/Diagram.scala index 1846f375cd..e15963bda9 100644 --- a/src/scaladoc/scala/tools/nsc/doc/model/diagram/Diagram.scala +++ b/src/scaladoc/scala/tools/nsc/doc/model/diagram/Diagram.scala @@ -99,7 +99,7 @@ case class NormalNode(tpe: TypeEntity, tpl: Option[TemplateEntity])(val tooltip: /** A class or trait the thisnode can be converted to by an implicit conversion * TODO: I think it makes more sense to use the tpe links to templates instead of the TemplateEntity for implicit nodes - * since some implicit conversions convert the class to complex types that cannot be represented as a single tmeplate + * since some implicit conversions convert the class to complex types that cannot be represented as a single template */ case class ImplicitNode(tpe: TypeEntity, tpl: Option[TemplateEntity])(val tooltip: Option[String] = None) extends Node { override def isImplicitNode = true } diff --git a/test/files/neg/t7214neg.scala b/test/files/neg/t7214neg.scala index ff1ea8082d..e2b2d908d8 100644 --- a/test/files/neg/t7214neg.scala +++ b/test/files/neg/t7214neg.scala @@ -1,4 +1,4 @@ -// pattern matcher crashes here trying to synthesize an uneeded outer test. +// pattern matcher crashes here trying to synthesize an unneeded outer test. // no-symbol does not have an owner // at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:49) // at scala.tools.nsc.Global.abort(Global.scala:253) diff --git a/test/files/pos/t6089b.scala b/test/files/pos/t6089b.scala index ff7ca157eb..040987413e 100644 --- a/test/files/pos/t6089b.scala +++ b/test/files/pos/t6089b.scala @@ -1,5 +1,5 @@ // this crazy code simply tries to nest pattern matches so that the last call is in a tricky-to-determine -// tail position (my initial tightenign of tailpos detection for SI-6089 ruled this out) +// tail position (my initial tightening of tailpos detection for SI-6089 ruled this out) class BKTree { @annotation.tailrec final def -?-[AA](a: AA): Boolean = this match { diff --git a/test/files/pos/t7689.scala b/test/files/pos/t7689.scala index 022e7ab7a0..72cca99bc0 100644 --- a/test/files/pos/t7689.scala +++ b/test/files/pos/t7689.scala @@ -2,6 +2,6 @@ object A { // The default getter must have an explicit return type (List[_] => Int) // This wasn't happening since e28c3edda4. That commit encoded upper/lower // bounds of Any/Nothing as EmptyTree, which were triggering an .isEmpty - // check in Namers#TypeTreeSubstitutor + // check in Namers#TypeTreeSubstituter def x(f: List[_] => Int = _ => 3) = 9 } diff --git a/test/files/run/t2127.scala b/test/files/run/t2127.scala index 869d8a38d6..839c8d6a5c 100755 --- a/test/files/run/t2127.scala +++ b/test/files/run/t2127.scala @@ -28,5 +28,5 @@ } -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. +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. */ diff --git a/test/files/run/t7214.scala b/test/files/run/t7214.scala index 15c2c24fa0..b2ef53eeab 100644 --- a/test/files/run/t7214.scala +++ b/test/files/run/t7214.scala @@ -1,4 +1,4 @@ -// pattern matcher crashes here trying to synthesize an uneeded outer test. +// pattern matcher crashes here trying to synthesize an unneeded outer test. // no-symbol does not have an owner // at scala.reflect.internal.SymbolTable.abort(SymbolTable.scala:49) // at scala.tools.nsc.Global.abort(Global.scala:253) -- cgit v1.2.3