Skip to content

Commit 4489530

Browse files
committed
Correct a large number of typos.
I scanned the main sources with IntellIJ's spell checker and corrected what showed up.
1 parent 275b2c3 commit 4489530

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+85
-85
lines changed

src/dotty/tools/backend/jvm/CollectEntryPoints.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class CollectEntryPoints extends MiniPhaseTransform {
4040
def phaseName: String = "Collect entry points"
4141

4242
override def transformDefDef(tree: tpd.DefDef)(implicit ctx: Context, info: TransformerInfo): tpd.Tree = {
43-
if ((tree.symbol ne NoSymbol) && CollectEntryPoints.isJavaEntyPoint(tree.symbol)) {
43+
if ((tree.symbol ne NoSymbol) && CollectEntryPoints.isJavaEntryPoint(tree.symbol)) {
4444
ctx.genBCodePhase.asInstanceOf[GenBCode].registerEntryPoint(tree.symbol)
4545
}
4646
tree
@@ -60,7 +60,7 @@ object CollectEntryPoints{
6060
})
6161
}
6262

63-
def isJavaEntyPoint(sym: Symbol)(implicit ctx: Context): Boolean = {
63+
def isJavaEntryPoint(sym: Symbol)(implicit ctx: Context): Boolean = {
6464
import Types.MethodType
6565
val d = ctx.definitions
6666
val StringType = d.StringType
@@ -105,7 +105,7 @@ object CollectEntryPoints{
105105
failNoForwarder("companion contains its own main method (implementation restriction: no main is allowed, regardless of signature)")
106106
else if (companion.flags is Flags.Trait)
107107
failNoForwarder("companion is a trait")
108-
// Now either succeeed, or issue some additional warnings for things which look like
108+
// Now either succeed, or issue some additional warnings for things which look like
109109
// attempts to be java main methods.
110110
else (possibles exists(x=> isJavaMainMethod(x.symbol))) || {
111111
possibles exists { m =>

src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
617617
def hasAnnotation(sym: Symbol): Boolean = false
618618
def shouldEmitForwarders: Boolean = //exitingPickler { !(sym.name.toString contains '$')
619619
(sym is Flags.Module) && !(sym is Flags.ImplClass) /// !sym.isNestedClass
620-
def isJavaEntryPoint: Boolean = CollectEntryPoints.isJavaEntyPoint(sym)
620+
def isJavaEntryPoint: Boolean = CollectEntryPoints.isJavaEntryPoint(sym)
621621

622622
def isClassConstructor: Boolean = toDenot(sym).isClassConstructor
623623

src/dotty/tools/backend/jvm/GenBCode.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
342342
tree match {
343343
case EmptyTree => ()
344344
case PackageDef(_, stats) => stats foreach gen
345-
case ValDef(name, tpt, rhs) => () // module val not emmited
345+
case ValDef(name, tpt, rhs) => () // module val not emitted
346346
case cd: TypeDef =>
347347
q1 add Item1(arrivalPos, cd, int.currentUnit)
348348
arrivalPos += 1

src/dotty/tools/dotc/Run.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ class Run(comp: Compiler)(implicit ctx: Context) {
3737
throw ex
3838
}
3939

40-
/** TODO: There's a fundamental design problem here: We assmble phases using `squash`
40+
/** TODO: There's a fundamental design problem here: We assemble phases using `squash`
4141
* when we first build the compiler. But we modify them with -Yskip, -Ystop
42-
* on each run. That modification needs to either trasnform the tree structure,
43-
* or we need to assmeble phases on each run, and take -Yskip, -Ystop into
42+
* on each run. That modification needs to either transform the tree structure,
43+
* or we need to assemble phases on each run, and take -Yskip, -Ystop into
4444
* account. I think the latter would be preferable.
4545
*/
4646
def compileSources(sources: List[SourceFile]) =
@@ -67,9 +67,9 @@ class Run(comp: Compiler)(implicit ctx: Context) {
6767
private def printTree(ctx: Context) = {
6868
val unit = ctx.compilationUnit
6969
val prevPhase = ctx.phase.prev // can be a mini-phase
70-
val squahsedPhase = ctx.squashed(prevPhase)
70+
val squashedPhase = ctx.squashed(prevPhase)
7171

72-
println(s"result of $unit after ${squahsedPhase}:")
72+
println(s"result of $unit after ${squashedPhase}:")
7373
println(unit.tpdTree.show(ctx))
7474
}
7575

src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object desugar {
3636
/** Make sure that for all enclosing module classes their companion lasses
3737
* are completed. Reason: We need the constructor of such companion classes to
3838
* be completed so that OriginalSymbol attachments are pushed to DerivedTypeTrees
39-
* in appy/unapply methods.
39+
* in apply/unapply methods.
4040
*/
4141
override def ensureCompletions(implicit ctx: Context) =
4242
if (!(ctx.owner is Package))
@@ -335,7 +335,7 @@ object desugar {
335335
.withMods(synthetic))
336336
.withPos(cdef.pos).toList
337337

338-
// The companion object defifinitions, if a companion is needed, Nil otherwise.
338+
// The companion object definitions, if a companion is needed, Nil otherwise.
339339
// companion definitions include:
340340
// 1. If class is a case class case class C[Ts](p1: T1, ..., pN: TN)(moreParams):
341341
// def apply[Ts](p1: T1, ..., pN: TN)(moreParams) = new C[Ts](p1, ..., pN)(moreParams) (unless C is abstract)

src/dotty/tools/dotc/ast/TreeInfo.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] =>
256256
case y => y
257257
}
258258

259-
/** Checks whether predicate `p` is true for all result parts of this epression,
259+
/** Checks whether predicate `p` is true for all result parts of this expression,
260260
* where we zoom into Ifs, Matches, and Blocks.
261261
*/
262262
def forallResults(tree: Tree, p: Tree => Boolean): Boolean = tree match {

src/dotty/tools/dotc/ast/TreeTypeMap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import dotty.tools.dotc.transform.SymUtils._
2525
* The reason the substitution is broken out from the rest of the type map is
2626
* that all symbols have to be substituted at the same time. If we do not do this,
2727
* we risk data races on named types. Example: Say we have `outer#1.inner#2` and we
28-
* have two substitutons S1 = [outer#1 := outer#3], S2 = [inner#2 := inner#4] where
28+
* have two substitutions S1 = [outer#1 := outer#3], S2 = [inner#2 := inner#4] where
2929
* hashtags precede symbol ids. If we do S1 first, we get outer#2.inner#3. If we then
3030
* do S2 we get outer#2.inner#4. But that means that the named type outer#2.inner
3131
* gets two different denotations in the same period. Hence, if -Yno-double-bindings is

src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object Trees {
3232
* @param flags The set flags
3333
* @param privateWithin If a private or protected has is followed by a
3434
* qualifier [q], the name q, "" as a typename otherwise.
35-
* @param annotations The annotations preceding the modifers
35+
* @param annotations The annotations preceding the modifiers
3636
*/
3737
case class Modifiers[-T >: Untyped] (
3838
flags: FlagSet = EmptyFlags,
@@ -215,7 +215,7 @@ object Trees {
215215
s
216216
}
217217

218-
/** If this is a thicket, gerform `op` on each of its trees
218+
/** If this is a thicket, perform `op` on each of its trees
219219
* otherwise, perform `op` ion tree itself.
220220
*/
221221
def foreachInThicket(op: Tree[T] => Unit): Unit = op(this)
@@ -361,7 +361,7 @@ object Trees {
361361
case class This[-T >: Untyped] private[ast] (qual: TypeName)
362362
extends DenotingTree[T] with TermTree[T] {
363363
type ThisTree[-T >: Untyped] = This[T]
364-
// Denotation of a This tree is always the udnerlying class; needs correction for modules.
364+
// Denotation of a This tree is always the underlying class; needs correction for modules.
365365
override def denot(implicit ctx: Context): Denotation = {
366366
tpe match {
367367
case tpe @ TermRef(pre, _) if tpe.symbol is Module =>

src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
865865
}
866866
}
867867

868-
/** A traverser that passes the enlcosing class or method as an argumenr
868+
/** A traverser that passes the enclosing class or method as an argument
869869
* to the traverse method.
870870
*/
871871
abstract class EnclosingMethodTraverser extends TreeAccumulator[Symbol] {

src/dotty/tools/dotc/config/Config.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ object Config {
1010

1111
final val checkCacheMembersNamed = false
1212

13-
/** When updating a connstraint bound, check that the constrained parameter
13+
/** When updating a constraint bound, check that the constrained parameter
1414
* does not appear at the top-level of either of its bounds.
1515
*/
1616
final val checkConstraintsNonCyclic = false
@@ -56,7 +56,7 @@ object Config {
5656
final val fastPathForRefinedSubtype = true
5757

5858
/** When set, use new signature-based matching.
59-
* Advantantage of doing so: It's supposed to be faster
59+
* Advantage of doing so: It's supposed to be faster
6060
* Disadvantage: It might hide inconsistencies, so while debugging it's better to turn it off
6161
*/
6262
final val newMatch = false

src/dotty/tools/dotc/core/Contexts.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ object Contexts {
4040
* named `initctx`. They pass initctx to all positions where it is needed
4141
* (and these positions should all be part of the intialization sequence of the class).
4242
* - Classes that need contexts that survive initialization are instead passed
43-
* a "condensed context", typically named `cctx` (or they create one). Consensed contexts
43+
* a "condensed context", typically named `cctx` (or they create one). Condensed contexts
4444
* just add some basic information to the context base without the
4545
* risk of capturing complete trees.
4646
* - To make sure these rules are kept, it would be good to do a sanity
@@ -290,7 +290,7 @@ object Contexts {
290290
* - At the same time the context should see the parameter accessors of the current class,
291291
* that's why they get added to the local scope. An alternative would have been to have the
292292
* context see the constructor parameters instead, but then we'd need a final substitution step
293-
* from constructor parameters to class paramater accessors.
293+
* from constructor parameters to class parameter accessors.
294294
*/
295295
def superCallContext: Context = {
296296
val locals = newScopeWith(owner.asClass.paramAccessors: _*)
@@ -567,7 +567,7 @@ object Contexts {
567567
/** Phases by id */
568568
private[core] var phases: Array[Phase] = _
569569

570-
/** Phases with consecutive Transforms groupped into a single phase, Empty array if squashing is disabled */
570+
/** Phases with consecutive Transforms grouped into a single phase, Empty array if squashing is disabled */
571571
private[core] var squashedPhases: Array[Phase] = Array.empty[Phase]
572572

573573
/** Next denotation transformer id */
@@ -576,7 +576,7 @@ object Contexts {
576576
private[core] var denotTransformers: Array[DenotTransformer] = _
577577

578578
// Printers state
579-
/** Number of recursive invocations of a show method on cuyrrent stack */
579+
/** Number of recursive invocations of a show method on current stack */
580580
private[dotc] var toTextRecursions = 0
581581

582582
// Reporters state
@@ -600,7 +600,7 @@ object Contexts {
600600
/** implicit conversion that injects all ContextBase members into a context */
601601
implicit def toBase(ctx: Context): ContextBase = ctx.base
602602

603-
val theBase = new ContextBase // !!! DEBUG, so that we can use a minimal context for reporting even in code that normallly cannot access a context
603+
val theBase = new ContextBase // !!! DEBUG, so that we can use a minimal context for reporting even in code that normally cannot access a context
604604
}
605605

606606
/** Info that changes on each compiler run */

src/dotty/tools/dotc/core/Decorators.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object Decorators {
3636
final val MaxFilterRecursions = 1000
3737

3838
/** Implements filterConserve, zipWithConserve methods
39-
* on lists that avoid dupliation of list nodes where feasible.
39+
* on lists that avoid duplication of list nodes where feasible.
4040
*/
4141
implicit class ListDecorator[T](val xs: List[T]) extends AnyVal {
4242

src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ object Denotations {
583583
else {
584584
next match {
585585
case next: ClassDenotation =>
586-
assert(!next.is(Package), s"illegal transfomation of package denotation by transformer ${ctx.withPhase(transformer).phase}")
586+
assert(!next.is(Package), s"illegal transformation of package denotation by transformer ${ctx.withPhase(transformer).phase}")
587587
next.resetFlag(Frozen)
588588
case _ =>
589589
}

src/dotty/tools/dotc/core/Names.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,15 @@ object Names {
313313
/** Create a term name from a string, without encoding operators */
314314
def termName(s: String): TermName = termName(s.toCharArray, 0, s.length)
315315

316-
/** Create a type name from a string, wihtout encoding operators */
316+
/** Create a type name from a string, without encoding operators */
317317
def typeName(s: String): TypeName = typeName(s.toCharArray, 0, s.length)
318318

319-
/** The term name represented by the empoty string */
319+
/** The term name represented by the empty string */
320320
val EmptyTermName = new TermName(-1, 0, null)
321321

322322
table(0) = EmptyTermName
323323

324-
/** The type name represented by the empoty string */
324+
/** The type name represented by the empty string */
325325
val EmptyTypeName = EmptyTermName.toTypeName
326326

327327
// can't move CONSTRUCTOR/EMPTY_PACKAGE to `nme` because of bootstrap failures in `encode`.

src/dotty/tools/dotc/core/Phases.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ object Phases {
161161
}
162162

163163
def checkRequirements(p: Phase) = {
164-
val unmetPreceedeRequirements = p.runsAfter -- phasesAfter
165-
assert(unmetPreceedeRequirements.isEmpty,
166-
s"phase ${p} has unmet requirement: ${unmetPreceedeRequirements.mkString(", ")} should precede this phase")
164+
val unmetPrecedeRequirements = p.runsAfter -- phasesAfter
165+
assert(unmetPrecedeRequirements.isEmpty,
166+
s"phase ${p} has unmet requirement: ${unmetPrecedeRequirements.mkString(", ")} should precede this phase")
167167
phasesAfter += p.getClazz
168168

169169
}

src/dotty/tools/dotc/core/Signature.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import TypeErasure.sigName
2525
*/
2626
case class Signature(paramsSig: List[TypeName], resSig: TypeName) {
2727

28-
/** Does this signature conincide with that signature on their parameter parts? */
28+
/** Does this signature coincide with that signature on their parameter parts? */
2929
final def sameParams(that: Signature): Boolean = this.paramsSig == that.paramsSig
3030

3131
/** The meaning of `matches` depends on the phase. If types are not erased,

src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ object SymDenotations {
743743
* Definitions flagged with InSuperCall are treated specially.
744744
* Their enclosing class is not the lexically enclosing class,
745745
* but in turn the enclosing class of the latter. This reflects
746-
* the context created by `Context#superCallContext`, `Contect#thisCallArgContext`
746+
* the context created by `Context#superCallContext`, `Context#thisCallArgContext`
747747
* for these definitions.
748748
*
749749
* Note, that as packages have ClassSymbols, top level classes will have an `enclosingClass`
@@ -839,7 +839,7 @@ object SymDenotations {
839839
* Three alternative strategies:
840840
* 1. If owner is a class, look in its members, otherwise
841841
* 2. If current compilation unit has a typed tree,
842-
* determine the definining statement sequence and search its trees, otherwise
842+
* determine the defining statement sequence and search its trees, otherwise
843843
* 3. If context has an enclosing scope which defines this symbol,
844844
* lookup its companion in the same scope.
845845
*/
@@ -954,7 +954,7 @@ object SymDenotations {
954954
loop(base.info.baseClasses.dropWhile(owner != _).tail)
955955
}
956956

957-
/** A a member of class `base` is incomplete if
957+
/** A member of class `base` is incomplete if
958958
* (1) it is declared deferred or
959959
* (2) it is abstract override and its super symbol in `base` is
960960
* nonexistent or incomplete.

src/dotty/tools/dotc/core/SymbolLoaders.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ abstract class SymbolLoader extends LazyType {
182182

183183
def sourceFileOrNull: AbstractFile = null
184184

185-
/** Description of the resource (ClassPath, AbstractFile, MsilFile)
185+
/** Description of the resource (ClassPath, AbstractFile)
186186
* being processed by this loader
187187
*/
188188
def description: String

src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ trait Symbols { this: Context =>
109109
ClassInfo(owner.thisType, _, parents, decls, selfInfo),
110110
privateWithin, coord, assocFile)
111111

112-
/** Same as `newCompleteClassSymbol` except that `parents` can be a list of arbitary
112+
/** Same as `newCompleteClassSymbol` except that `parents` can be a list of arbitrary
113113
* types which get normalized into type refs and parameter bindings.
114114
*/
115115
def newNormalizedClassSymbol(

src/dotty/tools/dotc/core/TypeApplications.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,13 @@ class TypeApplications(val self: Type) extends AnyVal {
235235
baseArgInfos(base) mapConserve noBounds
236236

237237
/** The type arguments of this type's base type instance wrt.`base`.
238-
* Existential types in arguments are approximanted by their lower bound.
238+
* Existential types in arguments are approximated by their lower bound.
239239
*/
240240
final def baseArgTypesLo(base: Symbol)(implicit ctx: Context): List[Type] =
241241
baseArgInfos(base) mapConserve boundsToLo
242242

243243
/** The type arguments of this type's base type instance wrt.`base`.
244-
* Existential types in arguments are approximanted by their upper bound.
244+
* Existential types in arguments are approximated by their upper bound.
245245
*/
246246
final def baseArgTypesHi(base: Symbol)(implicit ctx: Context): List[Type] =
247247
baseArgInfos(base) mapConserve boundsToHi

src/dotty/tools/dotc/core/Types.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ object Types {
11941194
def denotationIsCurrent(implicit ctx: Context) =
11951195
lastDenotation != null && lastDenotation.validFor.runId == ctx.runId
11961196

1197-
/** The the denotation is current, its symbol, otherwise NoDenotation.
1197+
/** The denotation is current, its symbol, otherwise NoDenotation.
11981198
*
11991199
* Note: This operation does not force the denotation, and is therefore
12001200
* timing dependent. It should only be used if the outcome of the
@@ -2303,7 +2303,7 @@ object Types {
23032303
*/
23042304
final class TypeVar(val origin: PolyParam, creatorState: TyperState, val owningTree: untpd.Tree, val owner: Symbol) extends CachedProxyType with ValueType {
23052305

2306-
/** The permanent instance type of the the variable, or NoType is none is given yet */
2306+
/** The permanent instance type of the variable, or NoType is none is given yet */
23072307
private[core] var inst: Type = NoType
23082308

23092309
/** The state owning the variable. This is at first `creatorState`, but it can

src/dotty/tools/dotc/core/tasty/TreeBuffer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class TreeBuffer extends TastyBuffer(50000) {
105105

106106
/** Adjust deltas to also take account references that will shrink (and thereby
107107
* generate additional zeroes that can be skipped) due to previously
108-
* computed adjustements.
108+
* computed adjustments.
109109
*/
110110
private def adjustDeltas(): Int = {
111111
val delta1 = new Array[Int](delta.length)

src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
181181
protected def errorBadSignature(msg: String, original: Option[RuntimeException] = None)(implicit ctx: Context) = {
182182
val ex = new BadSignature(
183183
sm"""error reading Scala signature of $classRoot from $source:
184-
|error occured at position $readIndex: $msg""")
184+
|error occurred at position $readIndex: $msg""")
185185
/*if (debug)*/ original.getOrElse(ex).printStackTrace() // !!! DEBUG
186186
throw ex
187187
}
188188

189189
protected def handleRuntimeException(ex: RuntimeException)(implicit ctx: Context) = ex match {
190190
case ex: BadSignature => throw ex
191-
case _ => errorBadSignature(s"a runtime exception occured: $ex", Some(ex))
191+
case _ => errorBadSignature(s"a runtime exception occurred: $ex", Some(ex))
192192
}
193193

194194
private var postReadOp: Context => Unit = null
@@ -884,7 +884,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
884884
deferredAnnot(end)
885885
}
886886

887-
/** A deferred annotation that can be comleted by reading
887+
/** A deferred annotation that can be completed by reading
888888
* the bytes between `readIndex` and `end`.
889889
*/
890890
protected def deferredAnnot(end: Int)(implicit ctx: Context): Annotation = {

src/dotty/tools/dotc/transform/CollectEntryPoints.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class CollectEntryPoints extends MiniPhaseTransform {
8080
failNoForwarder("companion contains its own main method (implementation restriction: no main is allowed, regardless of signature)")
8181
else if (companion.flags is Flags.Trait)
8282
failNoForwarder("companion is a trait")
83-
// Now either succeeed, or issue some additional warnings for things which look like
83+
// Now either succeed, or issue some additional warnings for things which look like
8484
// attempts to be java main methods.
8585
else (possibles exists (x => javaPlatform.isJavaMainMethod(x.symbol))) || {
8686
possibles exists {

0 commit comments

Comments
 (0)