Skip to content

Commit 9c9656b

Browse files
committed
Fix typos
1 parent c03cb65 commit 9c9656b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/transform/PCPCheckAndHeal.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import scala.annotation.constructorOnly
3838
*
3939
* Type healing consists in transforming a phase inconsistent type `T` into a splice of `${summon[Type[T]]}`.
4040
*
41-
* As references to types do not necessarely have an assosiated tree it is not always possible to replace the types in place.
41+
* As references to types do not necessarily have an assosiated tree it is not always possible to replace the types directly.
4242
* Instead we always generate a type alias for it and palce it at the start of the surounding quote. This also avoids duplication.
4343
* For example:
4444
* '{
@@ -80,7 +80,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
8080
case tree1 => tree1
8181

8282
case _: Ident | _: This =>
83-
tree.withType(healTermType(tree.sourcePos)(tree.tpe))
83+
tree.withType(healTypeOfTerm(tree.sourcePos)(tree.tpe))
8484

8585
// Remove inline defs in quoted code. Already fully inlined.
8686
case tree: DefDef if tree.symbol.is(Inline) && level > 0 =>
@@ -156,7 +156,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
156156
private def healInfo(tree: Tree, pos: SourcePosition)(using Context): Unit =
157157
tree.symbol.info = healType(pos)(tree.symbol.info)
158158

159-
/** If the refers to a locally defined symbol (either directly, or in a pickled type),
159+
/** If the type refers to a locally defined symbol (either directly, or in a pickled type),
160160
* check that its staging level matches the current level.
161161
* - Static types and term are allowed at any level.
162162
* - If a type reference is used a higher level, then it is insosistent. Will atempt to heal before failing.
@@ -177,7 +177,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
177177
case prefix: ThisType if !tp.symbol.isStatic && level > levelOf(prefix.cls) =>
178178
tryHeal(tp.symbol, tp, pos)
179179
case prefix: TermRef if tp.symbol.isSplice =>
180-
// Heal explice type splice in the code
180+
// Heal explicit type splice in the code
181181
if level > 0 then getQuoteTypeTags.getTagRef(prefix) else tp
182182
case prefix: TermRef if !prefix.symbol.isStatic && level > levelOf(prefix.symbol) =>
183183
tryHeal(prefix.symbol, tp, pos)
@@ -193,7 +193,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
193193
}
194194

195195
/** Check phase consistency of terms and heal incosistent type references. */
196-
private def healTermType(pos: SourcePosition)(using Context) = new TypeMap {
196+
private def healTypeOfTerm(pos: SourcePosition)(using Context) = new TypeMap {
197197
def apply(tp: Type): Type =
198198
tp match
199199
case tp @ TypeRef(NoPrefix, _) if level > levelOf(tp.symbol) =>

0 commit comments

Comments
 (0)