diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2015-05-14 11:48:52 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2015-05-14 11:56:45 +1000 |
commit | 448953056d695c5137b079bb66fc5c6f6cdb9e8a (patch) | |
tree | ab7a9c3b1eea2d4c96c1cc0228d54592c6a1de22 /src | |
parent | 275b2c37dfbba3fa026c3821742c81b1d16e8db2 (diff) | |
download | dotty-448953056d695c5137b079bb66fc5c6f6cdb9e8a.tar.gz dotty-448953056d695c5137b079bb66fc5c6f6cdb9e8a.tar.bz2 dotty-448953056d695c5137b079bb66fc5c6f6cdb9e8a.zip |
Correct a large number of typos.
I scanned the main sources with IntellIJ's spell checker and
corrected what showed up.
Diffstat (limited to 'src')
42 files changed, 85 insertions, 85 deletions
diff --git a/src/dotty/tools/backend/jvm/CollectEntryPoints.scala b/src/dotty/tools/backend/jvm/CollectEntryPoints.scala index 513144bd6..80907fb99 100644 --- a/src/dotty/tools/backend/jvm/CollectEntryPoints.scala +++ b/src/dotty/tools/backend/jvm/CollectEntryPoints.scala @@ -40,7 +40,7 @@ class CollectEntryPoints extends MiniPhaseTransform { def phaseName: String = "Collect entry points" override def transformDefDef(tree: tpd.DefDef)(implicit ctx: Context, info: TransformerInfo): tpd.Tree = { - if ((tree.symbol ne NoSymbol) && CollectEntryPoints.isJavaEntyPoint(tree.symbol)) { + if ((tree.symbol ne NoSymbol) && CollectEntryPoints.isJavaEntryPoint(tree.symbol)) { ctx.genBCodePhase.asInstanceOf[GenBCode].registerEntryPoint(tree.symbol) } tree @@ -60,7 +60,7 @@ object CollectEntryPoints{ }) } - def isJavaEntyPoint(sym: Symbol)(implicit ctx: Context): Boolean = { + def isJavaEntryPoint(sym: Symbol)(implicit ctx: Context): Boolean = { import Types.MethodType val d = ctx.definitions val StringType = d.StringType @@ -105,7 +105,7 @@ object CollectEntryPoints{ failNoForwarder("companion contains its own main method (implementation restriction: no main is allowed, regardless of signature)") else if (companion.flags is Flags.Trait) failNoForwarder("companion is a trait") - // Now either succeeed, or issue some additional warnings for things which look like + // Now either succeed, or issue some additional warnings for things which look like // attempts to be java main methods. else (possibles exists(x=> isJavaMainMethod(x.symbol))) || { possibles exists { m => diff --git a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index a72ed1130..4e4e51d96 100644 --- a/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -617,7 +617,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{ def hasAnnotation(sym: Symbol): Boolean = false def shouldEmitForwarders: Boolean = //exitingPickler { !(sym.name.toString contains '$') (sym is Flags.Module) && !(sym is Flags.ImplClass) /// !sym.isNestedClass - def isJavaEntryPoint: Boolean = CollectEntryPoints.isJavaEntyPoint(sym) + def isJavaEntryPoint: Boolean = CollectEntryPoints.isJavaEntryPoint(sym) def isClassConstructor: Boolean = toDenot(sym).isClassConstructor diff --git a/src/dotty/tools/backend/jvm/GenBCode.scala b/src/dotty/tools/backend/jvm/GenBCode.scala index d7557acec..7729c3011 100644 --- a/src/dotty/tools/backend/jvm/GenBCode.scala +++ b/src/dotty/tools/backend/jvm/GenBCode.scala @@ -342,7 +342,7 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter tree match { case EmptyTree => () case PackageDef(_, stats) => stats foreach gen - case ValDef(name, tpt, rhs) => () // module val not emmited + case ValDef(name, tpt, rhs) => () // module val not emitted case cd: TypeDef => q1 add Item1(arrivalPos, cd, int.currentUnit) arrivalPos += 1 diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index 151288d23..401608a73 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -37,10 +37,10 @@ class Run(comp: Compiler)(implicit ctx: Context) { throw ex } - /** TODO: There's a fundamental design problem here: We assmble phases using `squash` + /** TODO: There's a fundamental design problem here: We assemble phases using `squash` * when we first build the compiler. But we modify them with -Yskip, -Ystop - * on each run. That modification needs to either trasnform the tree structure, - * or we need to assmeble phases on each run, and take -Yskip, -Ystop into + * on each run. That modification needs to either transform the tree structure, + * or we need to assemble phases on each run, and take -Yskip, -Ystop into * account. I think the latter would be preferable. */ def compileSources(sources: List[SourceFile]) = @@ -67,9 +67,9 @@ class Run(comp: Compiler)(implicit ctx: Context) { private def printTree(ctx: Context) = { val unit = ctx.compilationUnit val prevPhase = ctx.phase.prev // can be a mini-phase - val squahsedPhase = ctx.squashed(prevPhase) + val squashedPhase = ctx.squashed(prevPhase) - println(s"result of $unit after ${squahsedPhase}:") + println(s"result of $unit after ${squashedPhase}:") println(unit.tpdTree.show(ctx)) } diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala index ec5519d0f..94b76c0a3 100644 --- a/src/dotty/tools/dotc/ast/Desugar.scala +++ b/src/dotty/tools/dotc/ast/Desugar.scala @@ -36,7 +36,7 @@ object desugar { /** Make sure that for all enclosing module classes their companion lasses * are completed. Reason: We need the constructor of such companion classes to * be completed so that OriginalSymbol attachments are pushed to DerivedTypeTrees - * in appy/unapply methods. + * in apply/unapply methods. */ override def ensureCompletions(implicit ctx: Context) = if (!(ctx.owner is Package)) @@ -335,7 +335,7 @@ object desugar { .withMods(synthetic)) .withPos(cdef.pos).toList - // The companion object defifinitions, if a companion is needed, Nil otherwise. + // The companion object definitions, if a companion is needed, Nil otherwise. // companion definitions include: // 1. If class is a case class case class C[Ts](p1: T1, ..., pN: TN)(moreParams): // def apply[Ts](p1: T1, ..., pN: TN)(moreParams) = new C[Ts](p1, ..., pN)(moreParams) (unless C is abstract) diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala index 13e10105c..2f6b6b914 100644 --- a/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -256,7 +256,7 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] => case y => y } - /** Checks whether predicate `p` is true for all result parts of this epression, + /** Checks whether predicate `p` is true for all result parts of this expression, * where we zoom into Ifs, Matches, and Blocks. */ def forallResults(tree: Tree, p: Tree => Boolean): Boolean = tree match { diff --git a/src/dotty/tools/dotc/ast/TreeTypeMap.scala b/src/dotty/tools/dotc/ast/TreeTypeMap.scala index 511c5ef4a..d714a3d21 100644 --- a/src/dotty/tools/dotc/ast/TreeTypeMap.scala +++ b/src/dotty/tools/dotc/ast/TreeTypeMap.scala @@ -25,7 +25,7 @@ import dotty.tools.dotc.transform.SymUtils._ * The reason the substitution is broken out from the rest of the type map is * that all symbols have to be substituted at the same time. If we do not do this, * we risk data races on named types. Example: Say we have `outer#1.inner#2` and we - * have two substitutons S1 = [outer#1 := outer#3], S2 = [inner#2 := inner#4] where + * have two substitutions S1 = [outer#1 := outer#3], S2 = [inner#2 := inner#4] where * hashtags precede symbol ids. If we do S1 first, we get outer#2.inner#3. If we then * do S2 we get outer#2.inner#4. But that means that the named type outer#2.inner * gets two different denotations in the same period. Hence, if -Yno-double-bindings is diff --git a/src/dotty/tools/dotc/ast/Trees.scala b/src/dotty/tools/dotc/ast/Trees.scala index 5358ad0c4..fcb9df7fb 100644 --- a/src/dotty/tools/dotc/ast/Trees.scala +++ b/src/dotty/tools/dotc/ast/Trees.scala @@ -32,7 +32,7 @@ object Trees { * @param flags The set flags * @param privateWithin If a private or protected has is followed by a * qualifier [q], the name q, "" as a typename otherwise. - * @param annotations The annotations preceding the modifers + * @param annotations The annotations preceding the modifiers */ case class Modifiers[-T >: Untyped] ( flags: FlagSet = EmptyFlags, @@ -215,7 +215,7 @@ object Trees { s } - /** If this is a thicket, gerform `op` on each of its trees + /** If this is a thicket, perform `op` on each of its trees * otherwise, perform `op` ion tree itself. */ def foreachInThicket(op: Tree[T] => Unit): Unit = op(this) @@ -361,7 +361,7 @@ object Trees { case class This[-T >: Untyped] private[ast] (qual: TypeName) extends DenotingTree[T] with TermTree[T] { type ThisTree[-T >: Untyped] = This[T] - // Denotation of a This tree is always the udnerlying class; needs correction for modules. + // Denotation of a This tree is always the underlying class; needs correction for modules. override def denot(implicit ctx: Context): Denotation = { tpe match { case tpe @ TermRef(pre, _) if tpe.symbol is Module => diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala index dce06da95..0468d6012 100644 --- a/src/dotty/tools/dotc/ast/tpd.scala +++ b/src/dotty/tools/dotc/ast/tpd.scala @@ -865,7 +865,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { } } - /** A traverser that passes the enlcosing class or method as an argumenr + /** A traverser that passes the enclosing class or method as an argument * to the traverse method. */ abstract class EnclosingMethodTraverser extends TreeAccumulator[Symbol] { diff --git a/src/dotty/tools/dotc/config/Config.scala b/src/dotty/tools/dotc/config/Config.scala index 6022d3580..38ebca078 100644 --- a/src/dotty/tools/dotc/config/Config.scala +++ b/src/dotty/tools/dotc/config/Config.scala @@ -10,7 +10,7 @@ object Config { final val checkCacheMembersNamed = false - /** When updating a connstraint bound, check that the constrained parameter + /** When updating a constraint bound, check that the constrained parameter * does not appear at the top-level of either of its bounds. */ final val checkConstraintsNonCyclic = false @@ -56,7 +56,7 @@ object Config { final val fastPathForRefinedSubtype = true /** When set, use new signature-based matching. - * Advantantage of doing so: It's supposed to be faster + * Advantage of doing so: It's supposed to be faster * Disadvantage: It might hide inconsistencies, so while debugging it's better to turn it off */ final val newMatch = false diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index 61d4e9874..5d2750aa8 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -40,7 +40,7 @@ object Contexts { * named `initctx`. They pass initctx to all positions where it is needed * (and these positions should all be part of the intialization sequence of the class). * - Classes that need contexts that survive initialization are instead passed - * a "condensed context", typically named `cctx` (or they create one). Consensed contexts + * a "condensed context", typically named `cctx` (or they create one). Condensed contexts * just add some basic information to the context base without the * risk of capturing complete trees. * - To make sure these rules are kept, it would be good to do a sanity @@ -290,7 +290,7 @@ object Contexts { * - At the same time the context should see the parameter accessors of the current class, * that's why they get added to the local scope. An alternative would have been to have the * context see the constructor parameters instead, but then we'd need a final substitution step - * from constructor parameters to class paramater accessors. + * from constructor parameters to class parameter accessors. */ def superCallContext: Context = { val locals = newScopeWith(owner.asClass.paramAccessors: _*) @@ -567,7 +567,7 @@ object Contexts { /** Phases by id */ private[core] var phases: Array[Phase] = _ - /** Phases with consecutive Transforms groupped into a single phase, Empty array if squashing is disabled */ + /** Phases with consecutive Transforms grouped into a single phase, Empty array if squashing is disabled */ private[core] var squashedPhases: Array[Phase] = Array.empty[Phase] /** Next denotation transformer id */ @@ -576,7 +576,7 @@ object Contexts { private[core] var denotTransformers: Array[DenotTransformer] = _ // Printers state - /** Number of recursive invocations of a show method on cuyrrent stack */ + /** Number of recursive invocations of a show method on current stack */ private[dotc] var toTextRecursions = 0 // Reporters state @@ -600,7 +600,7 @@ object Contexts { /** implicit conversion that injects all ContextBase members into a context */ implicit def toBase(ctx: Context): ContextBase = ctx.base - val theBase = new ContextBase // !!! DEBUG, so that we can use a minimal context for reporting even in code that normallly cannot access a context + val theBase = new ContextBase // !!! DEBUG, so that we can use a minimal context for reporting even in code that normally cannot access a context } /** Info that changes on each compiler run */ diff --git a/src/dotty/tools/dotc/core/Decorators.scala b/src/dotty/tools/dotc/core/Decorators.scala index 4e672ef40..8aaef985c 100644 --- a/src/dotty/tools/dotc/core/Decorators.scala +++ b/src/dotty/tools/dotc/core/Decorators.scala @@ -36,7 +36,7 @@ object Decorators { final val MaxFilterRecursions = 1000 /** Implements filterConserve, zipWithConserve methods - * on lists that avoid dupliation of list nodes where feasible. + * on lists that avoid duplication of list nodes where feasible. */ implicit class ListDecorator[T](val xs: List[T]) extends AnyVal { diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 756e0b02d..6ac15dbca 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -583,7 +583,7 @@ object Denotations { else { next match { case next: ClassDenotation => - assert(!next.is(Package), s"illegal transfomation of package denotation by transformer ${ctx.withPhase(transformer).phase}") + assert(!next.is(Package), s"illegal transformation of package denotation by transformer ${ctx.withPhase(transformer).phase}") next.resetFlag(Frozen) case _ => } diff --git a/src/dotty/tools/dotc/core/Names.scala b/src/dotty/tools/dotc/core/Names.scala index f0d3f02eb..ea30b1c3b 100644 --- a/src/dotty/tools/dotc/core/Names.scala +++ b/src/dotty/tools/dotc/core/Names.scala @@ -313,15 +313,15 @@ object Names { /** Create a term name from a string, without encoding operators */ def termName(s: String): TermName = termName(s.toCharArray, 0, s.length) - /** Create a type name from a string, wihtout encoding operators */ + /** Create a type name from a string, without encoding operators */ def typeName(s: String): TypeName = typeName(s.toCharArray, 0, s.length) - /** The term name represented by the empoty string */ + /** The term name represented by the empty string */ val EmptyTermName = new TermName(-1, 0, null) table(0) = EmptyTermName - /** The type name represented by the empoty string */ + /** The type name represented by the empty string */ val EmptyTypeName = EmptyTermName.toTypeName // can't move CONSTRUCTOR/EMPTY_PACKAGE to `nme` because of bootstrap failures in `encode`. diff --git a/src/dotty/tools/dotc/core/Phases.scala b/src/dotty/tools/dotc/core/Phases.scala index e0496185e..0ec3320bb 100644 --- a/src/dotty/tools/dotc/core/Phases.scala +++ b/src/dotty/tools/dotc/core/Phases.scala @@ -161,9 +161,9 @@ object Phases { } def checkRequirements(p: Phase) = { - val unmetPreceedeRequirements = p.runsAfter -- phasesAfter - assert(unmetPreceedeRequirements.isEmpty, - s"phase ${p} has unmet requirement: ${unmetPreceedeRequirements.mkString(", ")} should precede this phase") + val unmetPrecedeRequirements = p.runsAfter -- phasesAfter + assert(unmetPrecedeRequirements.isEmpty, + s"phase ${p} has unmet requirement: ${unmetPrecedeRequirements.mkString(", ")} should precede this phase") phasesAfter += p.getClazz } diff --git a/src/dotty/tools/dotc/core/Signature.scala b/src/dotty/tools/dotc/core/Signature.scala index 8717c4f42..4d83a7963 100644 --- a/src/dotty/tools/dotc/core/Signature.scala +++ b/src/dotty/tools/dotc/core/Signature.scala @@ -25,7 +25,7 @@ import TypeErasure.sigName */ case class Signature(paramsSig: List[TypeName], resSig: TypeName) { - /** Does this signature conincide with that signature on their parameter parts? */ + /** Does this signature coincide with that signature on their parameter parts? */ final def sameParams(that: Signature): Boolean = this.paramsSig == that.paramsSig /** The meaning of `matches` depends on the phase. If types are not erased, diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 1ad718c29..064429c6b 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -743,7 +743,7 @@ object SymDenotations { * Definitions flagged with InSuperCall are treated specially. * Their enclosing class is not the lexically enclosing class, * but in turn the enclosing class of the latter. This reflects - * the context created by `Context#superCallContext`, `Contect#thisCallArgContext` + * the context created by `Context#superCallContext`, `Context#thisCallArgContext` * for these definitions. * * Note, that as packages have ClassSymbols, top level classes will have an `enclosingClass` @@ -839,7 +839,7 @@ object SymDenotations { * Three alternative strategies: * 1. If owner is a class, look in its members, otherwise * 2. If current compilation unit has a typed tree, - * determine the definining statement sequence and search its trees, otherwise + * determine the defining statement sequence and search its trees, otherwise * 3. If context has an enclosing scope which defines this symbol, * lookup its companion in the same scope. */ @@ -954,7 +954,7 @@ object SymDenotations { loop(base.info.baseClasses.dropWhile(owner != _).tail) } - /** A a member of class `base` is incomplete if + /** 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 incomplete. diff --git a/src/dotty/tools/dotc/core/SymbolLoaders.scala b/src/dotty/tools/dotc/core/SymbolLoaders.scala index 7fb44a106..a62a88dfb 100644 --- a/src/dotty/tools/dotc/core/SymbolLoaders.scala +++ b/src/dotty/tools/dotc/core/SymbolLoaders.scala @@ -182,7 +182,7 @@ abstract class SymbolLoader extends LazyType { def sourceFileOrNull: AbstractFile = null - /** Description of the resource (ClassPath, AbstractFile, MsilFile) + /** Description of the resource (ClassPath, AbstractFile) * being processed by this loader */ def description: String diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index 14acf26f5..0478b1b7b 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -109,7 +109,7 @@ trait Symbols { this: Context => ClassInfo(owner.thisType, _, parents, decls, selfInfo), privateWithin, coord, assocFile) - /** Same as `newCompleteClassSymbol` except that `parents` can be a list of arbitary + /** Same as `newCompleteClassSymbol` except that `parents` can be a list of arbitrary * types which get normalized into type refs and parameter bindings. */ def newNormalizedClassSymbol( diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index a5e24c5ff..8bd1651dc 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -235,13 +235,13 @@ class TypeApplications(val self: Type) extends AnyVal { baseArgInfos(base) mapConserve noBounds /** The type arguments of this type's base type instance wrt.`base`. - * Existential types in arguments are approximanted by their lower bound. + * Existential types in arguments are approximated by their lower bound. */ final def baseArgTypesLo(base: Symbol)(implicit ctx: Context): List[Type] = baseArgInfos(base) mapConserve boundsToLo /** The type arguments of this type's base type instance wrt.`base`. - * Existential types in arguments are approximanted by their upper bound. + * Existential types in arguments are approximated by their upper bound. */ final def baseArgTypesHi(base: Symbol)(implicit ctx: Context): List[Type] = baseArgInfos(base) mapConserve boundsToHi diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 24f59ee43..3ab621db1 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1194,7 +1194,7 @@ object Types { def denotationIsCurrent(implicit ctx: Context) = lastDenotation != null && lastDenotation.validFor.runId == ctx.runId - /** The the denotation is current, its symbol, otherwise NoDenotation. + /** The denotation is current, its symbol, otherwise NoDenotation. * * Note: This operation does not force the denotation, and is therefore * timing dependent. It should only be used if the outcome of the @@ -2303,7 +2303,7 @@ object Types { */ final class TypeVar(val origin: PolyParam, creatorState: TyperState, val owningTree: untpd.Tree, val owner: Symbol) extends CachedProxyType with ValueType { - /** The permanent instance type of the the variable, or NoType is none is given yet */ + /** The permanent instance type of the variable, or NoType is none is given yet */ private[core] var inst: Type = NoType /** The state owning the variable. This is at first `creatorState`, but it can diff --git a/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala b/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala index 6aba44d3b..d741c42c3 100644 --- a/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala +++ b/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala @@ -105,7 +105,7 @@ class TreeBuffer extends TastyBuffer(50000) { /** Adjust deltas to also take account references that will shrink (and thereby * generate additional zeroes that can be skipped) due to previously - * computed adjustements. + * computed adjustments. */ private def adjustDeltas(): Int = { val delta1 = new Array[Int](delta.length) diff --git a/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala b/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala index 56c1d90df..b4549a8d8 100644 --- a/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala +++ b/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala @@ -181,14 +181,14 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas protected def errorBadSignature(msg: String, original: Option[RuntimeException] = None)(implicit ctx: Context) = { val ex = new BadSignature( sm"""error reading Scala signature of $classRoot from $source: - |error occured at position $readIndex: $msg""") + |error occurred at position $readIndex: $msg""") /*if (debug)*/ original.getOrElse(ex).printStackTrace() // !!! DEBUG throw ex } protected def handleRuntimeException(ex: RuntimeException)(implicit ctx: Context) = ex match { case ex: BadSignature => throw ex - case _ => errorBadSignature(s"a runtime exception occured: $ex", Some(ex)) + case _ => errorBadSignature(s"a runtime exception occurred: $ex", Some(ex)) } private var postReadOp: Context => Unit = null @@ -884,7 +884,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas deferredAnnot(end) } - /** A deferred annotation that can be comleted by reading + /** A deferred annotation that can be completed by reading * the bytes between `readIndex` and `end`. */ protected def deferredAnnot(end: Int)(implicit ctx: Context): Annotation = { diff --git a/src/dotty/tools/dotc/transform/CollectEntryPoints.scala b/src/dotty/tools/dotc/transform/CollectEntryPoints.scala index 2ccadddc3..b85c44647 100644 --- a/src/dotty/tools/dotc/transform/CollectEntryPoints.scala +++ b/src/dotty/tools/dotc/transform/CollectEntryPoints.scala @@ -80,7 +80,7 @@ class CollectEntryPoints extends MiniPhaseTransform { failNoForwarder("companion contains its own main method (implementation restriction: no main is allowed, regardless of signature)") else if (companion.flags is Flags.Trait) failNoForwarder("companion is a trait") - // Now either succeeed, or issue some additional warnings for things which look like + // Now either succeed, or issue some additional warnings for things which look like // attempts to be java main methods. else (possibles exists (x => javaPlatform.isJavaMainMethod(x.symbol))) || { possibles exists { diff --git a/src/dotty/tools/dotc/transform/ElimRepeated.scala b/src/dotty/tools/dotc/transform/ElimRepeated.scala index 414d09541..9563a7ed0 100644 --- a/src/dotty/tools/dotc/transform/ElimRepeated.scala +++ b/src/dotty/tools/dotc/transform/ElimRepeated.scala @@ -82,7 +82,7 @@ class ElimRepeated extends MiniPhaseTransform with InfoTransformer with Annotati .appliedToType(elemType) .appliedTo(tree, Literal(Constant(elemClass.typeRef))) .ensureConforms(defn.ArrayType(elemType)) - // Because of phantomclasses, the Java array's type might not conform to the resturn type + // Because of phantomclasses, the Java array's type might not conform to the return type } override def transformTypeApply(tree: TypeApply)(implicit ctx: Context, info: TransformerInfo): Tree = diff --git a/src/dotty/tools/dotc/transform/ExplicitOuter.scala b/src/dotty/tools/dotc/transform/ExplicitOuter.scala index 09f0d695d..70a4f299a 100644 --- a/src/dotty/tools/dotc/transform/ExplicitOuter.scala +++ b/src/dotty/tools/dotc/transform/ExplicitOuter.scala @@ -257,7 +257,7 @@ object ExplicitOuter { * they cannot be added before erasure. * - outer arguments need access to outer parameters as well as to the * original type prefixes of types in New expressions. These prefixes - * get erased during erasure. Therefore, outer argumenrts have to be passed + * get erased during erasure. Therefore, outer arguments have to be passed * no later than erasure. */ class OuterOps(val ictx: Context) extends AnyVal { diff --git a/src/dotty/tools/dotc/transform/FullParameterization.scala b/src/dotty/tools/dotc/transform/FullParameterization.scala index d650eecb7..87d492062 100644 --- a/src/dotty/tools/dotc/transform/FullParameterization.scala +++ b/src/dotty/tools/dotc/transform/FullParameterization.scala @@ -109,7 +109,7 @@ trait FullParameterization { tp.substDealias(ctparams, classParamsRange map (PolyParam(pt, _))) } - /** The bounds for the added type paraneters of the polytype `pt` */ + /** The bounds for the added type parameters of the polytype `pt` */ def mappedClassBounds(pt: PolyType): List[TypeBounds] = ctparams.map(tparam => mapClassParams(tparam.info, pt).bounds) diff --git a/src/dotty/tools/dotc/transform/Getters.scala b/src/dotty/tools/dotc/transform/Getters.scala index e1c35feba..765791822 100644 --- a/src/dotty/tools/dotc/transform/Getters.scala +++ b/src/dotty/tools/dotc/transform/Getters.scala @@ -38,7 +38,7 @@ import Decorators._ * - fields generated for static modules (TODO: needed?) * - parameters, static fields, and fields coming from Java * - * Furthermore, assignements to mutable vars are replaced by setter calls + * Furthermore, assignments to mutable vars are replaced by setter calls * * p.x = e * --> p.x_=(e) diff --git a/src/dotty/tools/dotc/transform/Mixin.scala b/src/dotty/tools/dotc/transform/Mixin.scala index de0c0c801..e6e2ad259 100644 --- a/src/dotty/tools/dotc/transform/Mixin.scala +++ b/src/dotty/tools/dotc/transform/Mixin.scala @@ -36,7 +36,7 @@ import collection.mutable * * <mods> def x_=(y: T) = () * - * deferred by maping it to + * deferred by mapping it to * * <mods> def x_=(y: T) * diff --git a/src/dotty/tools/dotc/transform/PatternMatcher.scala b/src/dotty/tools/dotc/transform/PatternMatcher.scala index b1140a144..d665aa0c5 100644 --- a/src/dotty/tools/dotc/transform/PatternMatcher.scala +++ b/src/dotty/tools/dotc/transform/PatternMatcher.scala @@ -553,7 +553,7 @@ class PatternMatcher extends MiniPhaseTransform with DenotTransformer {thisTrans * The same exception for Seq patterns applies: if the last extractor is of type `Seq[U_N]`, * the pattern must have at least N arguments (exactly N if the last argument is annotated with `: _*`). * The arguments starting at N (and beyond) are taken from the sequence returned by apply_N, - * and it is checked that that sequence has enough elements to provide values for all expected sub-patterns. + * and it is checked that the sequence has enough elements to provide values for all expected sub-patterns. * * For a case class C, the implementation is assumed to be `def unapply_I(x: C) = x._I`, * and the extractor call is inlined under that assumption. diff --git a/src/dotty/tools/dotc/transform/TailRec.scala b/src/dotty/tools/dotc/transform/TailRec.scala index 09b4c735b..441d3ef2b 100644 --- a/src/dotty/tools/dotc/transform/TailRec.scala +++ b/src/dotty/tools/dotc/transform/TailRec.scala @@ -207,7 +207,7 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete def rewriteTailCall(recv: Tree): Tree = { c.debuglog("Rewriting tail recursive call: " + tree.pos) rewrote = true - val reciever = noTailTransform(recv) + val receiver = noTailTransform(recv) val callTargs: List[tpd.Tree] = if (abstractOverClass) { @@ -216,7 +216,7 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete } else targs val method = Apply(if (callTargs.nonEmpty) TypeApply(Ident(label.termRef), callTargs) else Ident(label.termRef), - List(reciever)) + List(receiver)) val res = if (method.tpe.widen.isParameterless) method @@ -302,7 +302,7 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete rewriteTry(tree) case Alternative(_) | Bind(_, _) => - assert(false, "We should've never gotten inside a pattern") + assert(false, "We should never have gotten inside a pattern") tree case ValDef(_, _, _) | EmptyTree | Super(_, _) | This(_) | diff --git a/src/dotty/tools/dotc/transform/TreeTransform.scala b/src/dotty/tools/dotc/transform/TreeTransform.scala index 0aba1e213..43d77d766 100644 --- a/src/dotty/tools/dotc/transform/TreeTransform.scala +++ b/src/dotty/tools/dotc/transform/TreeTransform.scala @@ -241,8 +241,8 @@ object TreeTransforms { next } - private def indexUpdate(prev: Array[Int], changedTansformation: Class[_], index: Int, name: String, copy: Boolean = true) = { - val isDefinedNow = hasRedefinedMethod(changedTansformation, name) + private def indexUpdate(prev: Array[Int], changedTransformation: Class[_], index: Int, name: String, copy: Boolean = true) = { + val isDefinedNow = hasRedefinedMethod(changedTransformation, name) val wasDefinedBefore = prev(index) == index if (isDefinedNow == wasDefinedBefore) prev else { @@ -332,10 +332,10 @@ object TreeTransforms { this(transformations.map(_.getClass).asInstanceOf[Array[Class[_]]]) } - def this(prev: NXTransformations, changedTansformation: TreeTransform, transformationIndex: Int, reuse: Boolean = false) = { + def this(prev: NXTransformations, changedTransformation: TreeTransform, transformationIndex: Int, reuse: Boolean = false) = { this() val copy = !reuse - val changedTransformationClass = changedTansformation.getClass + val changedTransformationClass = changedTransformation.getClass nxPrepIdent = indexUpdate(prev.nxPrepIdent, changedTransformationClass, transformationIndex, "prepareForIdent", copy) nxPrepSelect = indexUpdate(prev.nxPrepSelect, changedTransformationClass, transformationIndex, "prepareForSelect", copy) nxPrepThis = indexUpdate(prev.nxPrepThis, changedTransformationClass, transformationIndex, "prepareForThis", copy) @@ -400,7 +400,7 @@ object TreeTransforms { nxTransOther = indexUpdate(prev.nxTransOther, changedTransformationClass, transformationIndex, "transformOther", copy) } - /** Those arrays are used as "execution plan" in order to only execute non-tivial transformations\preparations + /** Those arrays are used as "execution plan" in order to only execute non-trivial transformations\preparations * for every integer i array(i) contains first non trivial transformation\preparation on particular tree subtype. * If no nontrivial transformation are left stored value is greater than transformers.size */ @@ -912,7 +912,7 @@ object TreeTransforms { case _ => tree } - final private[TreeTransforms] def goUnamed(tree: Tree, cur: Int)(implicit ctx: Context, info: TransformerInfo): Tree = + final private[TreeTransforms] def goUnnamed(tree: Tree, cur: Int)(implicit ctx: Context, info: TransformerInfo): Tree = tree match { case tree: This => goThis(tree, info.nx.nxTransThis(cur)) case tree: Super => goSuper(tree, info.nx.nxTransSuper(cur)) @@ -945,7 +945,7 @@ object TreeTransforms { tree match { // split one big match into 2 smaller ones case tree: NameTree => goNamed(tree, cur) - case tree => goUnamed(tree, cur) + case tree => goUnnamed(tree, cur) } } else tree @@ -1128,7 +1128,7 @@ object TreeTransforms { else { val expr = transform(tree.expr, mutatedInfo, cur) val from = tree.from - // don't thansform the `from` part, as this is not a normal ident, but + // don't transform the `from` part, as this is not a normal ident, but // a pointer to the enclosing method. Transforming this as a normal ident // can go wrong easily. If a transformation is needed, it should be // the responsibility of the transformReturn method to handle this also. diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index 114a494d1..855f265cc 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -144,7 +144,7 @@ trait Applications extends Compatibility { self: Typer => */ protected def liftFun(): Unit = () - /** A flag signalling that the typechecking the application was so far succesful */ + /** A flag signalling that the typechecking the application was so far successful */ private[this] var _ok = true def ok = _ok @@ -191,7 +191,7 @@ trait Applications extends Compatibility { self: Typer => else fail(s"$methString does not take parameters") } - /** The application was succesful */ + /** The application was successful */ def success = ok protected def methodType = methType.asInstanceOf[MethodType] @@ -203,7 +203,7 @@ trait Applications extends Compatibility { self: Typer => /** @param pnames The list of parameter names that are missing arguments * @param args The list of arguments that are not yet passed, or that are waiting to be dropped * @param nameToArg A map from as yet unseen names to named arguments - * @param toDrop A set of names that have aready be passed as named arguments + * @param toDrop A set of names that have already be passed as named arguments * * For a well-typed application we have the invariants * @@ -638,7 +638,7 @@ trait Applications extends Compatibility { self: Typer => untpd.EmptyTree } - /** A typed qual.unappy or qual.unappySeq tree, if this typechecks. + /** A typed qual.unapply or qual.unapplySeq tree, if this typechecks. * Otherwise fallBack with (maltyped) qual.unapply as argument * Note: requires special handling for overloaded occurrences of * unapply or unapplySeq. We first try to find a non-overloaded @@ -669,7 +669,7 @@ trait Applications extends Compatibility { self: Typer => } } - /** Produce a typed qual.unappy or qual.unappySeq tree, or + /** Produce a typed qual.unapply or qual.unapplySeq tree, or * else if this fails follow a type alias and try again. */ val unapplyFn = trySelectUnapply(qual) { sel => @@ -780,7 +780,7 @@ trait Applications extends Compatibility { self: Typer => new ApplicableToTrees(methRef, targs, args, resultType)(nestedContext).success } - /** Is given method reference applicable to type arguments `targs` and argument trees `args` without invfering views? + /** Is given method reference applicable to type arguments `targs` and argument trees `args` without inferring views? * @param resultType The expected result type of the application */ def isDirectlyApplicable(methRef: TermRef, targs: List[Type], args: List[Tree], resultType: Type)(implicit ctx: Context): Boolean = { @@ -819,7 +819,7 @@ trait Applications extends Compatibility { self: Typer => } /** In a set of overloaded applicable alternatives, is `alt1` at least as good as - * `alt2`? `alt1` and `alt2` are nonoverloaded references. + * `alt2`? `alt1` and `alt2` are non-overloaded references. */ def isAsGood(alt1: TermRef, alt2: TermRef)(implicit ctx: Context): Boolean = track("isAsGood") { ctx.traceIndented(i"isAsGood($alt1, $alt2)", overload) { diff --git a/src/dotty/tools/dotc/typer/Checking.scala b/src/dotty/tools/dotc/typer/Checking.scala index ffb74839d..f28f3b09a 100644 --- a/src/dotty/tools/dotc/typer/Checking.scala +++ b/src/dotty/tools/dotc/typer/Checking.scala @@ -64,7 +64,7 @@ object Checking { /** Are cycles allowed within nested refinedInfos of currently checked type? */ private var nestedCycleOK = false - /** Are cycles allwoed within currently checked type? */ + /** Are cycles allowed within currently checked type? */ private var cycleOK = false /** A diagnostic output string that indicates the position of the last diff --git a/src/dotty/tools/dotc/typer/FrontEnd.scala b/src/dotty/tools/dotc/typer/FrontEnd.scala index ceb806e52..056a57215 100644 --- a/src/dotty/tools/dotc/typer/FrontEnd.scala +++ b/src/dotty/tools/dotc/typer/FrontEnd.scala @@ -18,7 +18,7 @@ class FrontEnd extends Phase { try body catch { case NonFatal(ex) => - println(s"exception occured while $doing ${ctx.compilationUnit}") + println(s"exception occurred while $doing ${ctx.compilationUnit}") throw ex } diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala index cd3b633ac..b03bcfcf9 100644 --- a/src/dotty/tools/dotc/typer/Implicits.scala +++ b/src/dotty/tools/dotc/typer/Implicits.scala @@ -186,7 +186,7 @@ object Implicits { abstract class SearchResult /** A successful search - * @param ref The implicit reference that succeeeded + * @param ref The implicit reference that succeeded * @param tree The typed tree that can needs to be inserted * @param ctx The context after the implicit search */ @@ -299,7 +299,7 @@ trait ImplicitRunInfo { self: RunInfo => } // todo: compute implicits directly, without going via companionRefs? - def collectCompanions(tp: Type): TermRefSet = track("computeImplicicScope") { + def collectCompanions(tp: Type): TermRefSet = track("computeImplicitScope") { ctx.traceIndented(i"collectCompanions($tp)", implicits) { val comps = new TermRefSet tp match { diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala index 0223260a0..79e00db6b 100644 --- a/src/dotty/tools/dotc/typer/Inferencing.scala +++ b/src/dotty/tools/dotc/typer/Inferencing.scala @@ -45,9 +45,9 @@ trait Inferencing { this: Checking => /** The accumulator which forces type variables using the policy encoded in `force` * and returns whether the type is fully defined. Two phases: - * 1st Phase: Try to stantiate covariant and non-variant type variables to - * their lower bound. Record whether succesful. - * 2nd Phase: If first phase was succesful, instantiate all remaining type variables + * 1st Phase: Try to instantiate covariant and non-variant type variables to + * their lower bound. Record whether successful. + * 2nd Phase: If first phase was successful, instantiate all remaining type variables * to their upper bound. */ private class IsFullyDefinedAccumulator(force: ForceDegree.Value)(implicit ctx: Context) extends TypeAccumulator[Boolean] { diff --git a/src/dotty/tools/dotc/typer/ProtoTypes.scala b/src/dotty/tools/dotc/typer/ProtoTypes.scala index eb5758662..c7efe45b7 100644 --- a/src/dotty/tools/dotc/typer/ProtoTypes.scala +++ b/src/dotty/tools/dotc/typer/ProtoTypes.scala @@ -78,7 +78,7 @@ object ProtoTypes { def fold[T](x: T, ta: TypeAccumulator[T])(implicit ctx: Context): T = x } - /** A class marking ignored prototypes that can be reviealed by `deepenProto` */ + /** A class marking ignored prototypes that can be revealed by `deepenProto` */ case class IgnoredProto(ignored: Type) extends UncachedGroundType with MatchAlways { override def deepenProto(implicit ctx: Context): Type = ignored } diff --git a/src/dotty/tools/dotc/typer/TypeAssigner.scala b/src/dotty/tools/dotc/typer/TypeAssigner.scala index d3baad848..1ae0bec0c 100644 --- a/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -135,7 +135,7 @@ trait TypeAssigner { val name = tpe.name val d = tpe.denot.accessibleFrom(pre, superAccess) if (!d.exists) { - // it could be that we found an inaccessbile private member, but there is + // it could be that we found an inaccessible private member, but there is // an inherited non-private member with the same name and signature. val d2 = pre.nonPrivateMember(name) if (reallyExists(d2) && firstTry) diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 566e8289a..6033f580b 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -1141,11 +1141,11 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit } /** Add apply node or implicit conversions. Two strategies are tried, and the first - * that is succesful is picked. If neither of the strategies are succesful, continues with + * that is successful is picked. If neither of the strategies are successful, continues with * `fallBack`. * * 1st strategy: Try to insert `.apply` so that the result conforms to prototype `pt`. - * 2nd stratgey: If tree is a select `qual.name`, try to insert an implicit conversion + * 2nd stratgy: If tree is a select `qual.name`, try to insert an implicit conversion * around the qualifier part `qual` so that the result conforms to the expected type * with wildcard result type. */ diff --git a/src/dotty/tools/dotc/util/Attachment.scala b/src/dotty/tools/dotc/util/Attachment.scala index e29bf13fe..8088b4cd0 100644 --- a/src/dotty/tools/dotc/util/Attachment.scala +++ b/src/dotty/tools/dotc/util/Attachment.scala @@ -8,7 +8,7 @@ object Attachment { /** The class of keys for attachments yielding values of type V */ class Key[+V] - /** An implementation trait for attachements. + /** An implementation trait for attachments. * Clients should inherit from Container instead. */ trait LinkSource { diff --git a/src/dotty/tools/io/ClassPath.scala b/src/dotty/tools/io/ClassPath.scala index ecb063469..0d1402430 100644 --- a/src/dotty/tools/io/ClassPath.scala +++ b/src/dotty/tools/io/ClassPath.scala @@ -212,7 +212,7 @@ abstract class ClassPath { def sourcepaths: IndexedSeq[AbstractFile] /** - * Represents classes which can be loaded with a ClassfileLoader/MsilFileLoader + * Represents classes which can be loaded with a ClassfileLoader * and / or a SourcefileLoader. */ case class ClassRep(binary: Option[AbstractFile], source: Option[AbstractFile]) { |