Skip to content

Commit e365a38

Browse files
committed
correct spelling mistakes in comments
1 parent dbeceba commit e365a38

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class TypeComparer(initctx: Context) extends DotClass {
5555
result
5656
}
5757

58-
/** For stastics: count how many isSubTypes are part of succesful comparisons */
58+
/** For statistics: count how many isSubTypes are part of successful comparisons */
5959
private var successCount = 0
6060
private var totalCount = 0
6161

@@ -606,10 +606,10 @@ class TypeComparer(initctx: Context) extends DotClass {
606606
// x.type <: C assuming x has type A, and
607607
// x.type <: C assuming x has type B.
608608
// But it did not work, because derivedRef would always give back the same
609-
// type and cache the denotation. So it ended up copmparing just one branch.
610-
// The code seems to be unncessary for the tests and does not seems to help performance.
609+
// type and cache the denotation. So it ended up comparing just one branch.
610+
// The code seems to be unnecessary for the tests and does not seems to help performance.
611611
// So it is commented out. If we ever need to come back to this, we would have
612-
// to create unchached TermRefs in order to avoid cross talk between the branches.
612+
// to create uncached TermRefs in order to avoid cross talk between the branches.
613613
/*
614614
case OrType(tp11, tp12) =>
615615
val sd = tp1.denot.asSingleDenotation

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ object Types {
579579
}
580580

581581
/** Is this type close enough to that type so that members
582-
* with the two type would override each other?d
582+
* with the two types would override each other?
583583
* This means:
584584
* - Either both types are polytypes with the same number of
585585
* type parameters and their result types match after renaming
@@ -666,14 +666,14 @@ object Types {
666666
case _ => this
667667
}
668668

669-
/** Widen type if it is unstable (i.e. an EpxprType, or Termref to unstable symbol */
669+
/** Widen type if it is unstable (i.e. an ExprType, or TermRef to unstable symbol */
670670
final def widenIfUnstable(implicit ctx: Context): Type = stripTypeVar match {
671671
case tp: ExprType => tp.resultType.widenIfUnstable
672672
case tp: TermRef if !tp.symbol.isStable => tp.underlying.widenIfUnstable
673673
case _ => this
674674
}
675675

676-
/** Follow aliases and derefernces LazyRefs and instantiated TypeVars until type
676+
/** Follow aliases and dereferences LazyRefs and instantiated TypeVars until type
677677
* is no longer alias type, LazyRef, or instantiated type variable.
678678
*/
679679
final def dealias(implicit ctx: Context): Type = this match {
@@ -692,7 +692,7 @@ object Types {
692692
case tp => tp
693693
}
694694

695-
/** Peform successive widenings and dealiasings until none can be applied anymore */
695+
/** Perform successive widenings and dealiasings until none can be applied anymore */
696696
final def widenDealias(implicit ctx: Context): Type = {
697697
val res = this.widen.dealias
698698
if (res eq this) res else res.widenDealias
@@ -920,9 +920,9 @@ object Types {
920920
}
921921

922922
/** Same as `subst` but follows aliases as a fallback. When faced with a reference
923-
* to an alias type, where normal substiution does not yield a new type, the
923+
* to an alias type, where normal substitution does not yield a new type, the
924924
* substitution is instead applied to the alias. If that yields a new type,
925-
* this type is returned, outherwise the original type (not the alias) is returned.
925+
* this type is returned, otherwise the original type (not the alias) is returned.
926926
* A use case for this method is if one wants to substitute the type parameters
927927
* of a class and also wants to substitute any parameter accessors that alias
928928
* the type parameters.
@@ -1145,7 +1145,7 @@ object Types {
11451145
def map(tm: TypeMap)(implicit ctx: Context): ProtoType
11461146
}
11471147

1148-
/** Implementations of this trait cache the resukts of `narrow`. */
1148+
/** Implementations of this trait cache the results of `narrow`. */
11491149
trait NarrowCached extends Type {
11501150
private var myNarrow: TermRef = null
11511151
override def narrow(implicit ctx: Context): TermRef = {
@@ -1186,7 +1186,7 @@ object Types {
11861186
* timing dependent. It should only be used if the outcome of the
11871187
* essential computation does not depend on the symbol being present or not.
11881188
* It's currently used to take an optimized path in substituters and
1189-
* type accumulators, as well as to be safe in diagnostiic printing.
1189+
* type accumulators, as well as to be safe in diagnostic printing.
11901190
* Normally, it's better to use `symbol`, not `currentSymbol`.
11911191
*/
11921192
def currentSymbol(implicit ctx: Context) =
@@ -2555,7 +2555,7 @@ object Types {
25552555
/** The type of an import clause tree */
25562556
case class ImportType(expr: Tree) extends UncachedGroundType
25572557

2558-
/** Sentinal for "missing type" */
2558+
/** Sentinel for "missing type" */
25592559
case object NoType extends CachedGroundType {
25602560
override def exists = false
25612561
override def computeHash = hashSeed

0 commit comments

Comments
 (0)