Skip to content

Commit 4236787

Browse files
committed
Fix typos
1 parent 06da128 commit 4236787

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ class Definitions {
640640
@tu lazy val InternalQuoted_patternHole: Symbol = InternalQuotedModule.requiredMethod("patternHole")
641641
@tu lazy val InternalQuoted_patternBindHoleAnnot: ClassSymbol = InternalQuotedModule.requiredClass("patternBindHole")
642642
@tu lazy val InternalQuoted_QuoteTypeTagAnnot: ClassSymbol = InternalQuotedModule.requiredClass("quoteTypeTag")
643-
@tu lazy val InternalQuoted_formAboveAnnot: ClassSymbol = InternalQuotedModule.requiredClass("formAbove")
643+
@tu lazy val InternalQuoted_fromAboveAnnot: ClassSymbol = InternalQuotedModule.requiredClass("fromAbove")
644644

645645

646646
@tu lazy val InternalQuotedExprModule: Symbol = ctx.requiredModule("scala.internal.quoted.Expr")

compiler/src/dotty/tools/dotc/core/quoted/PickledQuotes.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ object PickledQuotes {
8181
val unpickled = unpickle(tastyBytes, args, isType = true)(ctx.addMode(Mode.ReadPositions))
8282
val tpt = unpickled match {
8383
case Block(aliases, tpt) =>
84-
// `@quoteTypeTag type` aliasses are not required after unpickling
8584
// `@quoteTypeTag type` aliasses are not required after unpickling
8685
val aliases1 = aliases.filter(!_.symbol.hasAnnotation(defn.InternalQuoted_QuoteTypeTagAnnot))
8786
seq(aliases1, tpt)

compiler/src/dotty/tools/dotc/tastyreflect/ReflectionCompilerInterface.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,7 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
18381838

18391839
def Definitions_InternalQuoted_patternHole: Symbol = defn.InternalQuoted_patternHole
18401840
def Definitions_InternalQuoted_patternBindHoleAnnot: Symbol = defn.InternalQuoted_patternBindHoleAnnot
1841-
def Definitions_InternalQuoted_formAboveAnnot: Symbol = defn.InternalQuoted_formAboveAnnot
1841+
def Definitions_InternalQuoted_fromAboveAnnot: Symbol = defn.InternalQuoted_fromAboveAnnot
18421842

18431843
// Types
18441844

compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ trait QuotesAndSplices { self: Typer =>
230230

231231
private def transformTypeBindingTypeDef(tdef: TypeDef, buff: mutable.Builder[Tree, List[Tree]])(implicit ctx: Context): Tree = {
232232
if (variance == -1)
233-
tdef.symbol.addAnnotation(Annotation(New(ref(defn.InternalQuoted_formAboveAnnot.typeRef)).withSpan(tdef.span)))
233+
tdef.symbol.addAnnotation(Annotation(New(ref(defn.InternalQuoted_fromAboveAnnot.typeRef)).withSpan(tdef.span)))
234234
val bindingType = getBinding(tdef.symbol).symbol.typeRef
235235
val bindingTypeTpe = AppliedType(defn.QuotedTypeClass.typeRef, bindingType :: Nil)
236236
assert(tdef.name.startsWith("$"))

library/src/scala/internal/Quoted.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ object Quoted {
2929
class patternType extends Annotation
3030

3131
/** A type pattern that must be aproximated from above */
32-
class formAbove extends Annotation
32+
class fromAbove extends Annotation
3333

3434
/** Artifact of pickled type splices
3535
*

library/src/scala/internal/quoted/Matcher.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ private[quoted] object Matcher {
2626
if (hasTypeSplices) {
2727
implicit val ctx: Context = internal.Context_GADT_setFreshGADTBounds(rootContext)
2828
val matchings = scrutineeTerm.underlyingArgument =#= patternTerm.underlyingArgument
29-
// After matching and doing all subtype check, we have to aproximate all the type bindings
29+
// After matching and doing all subtype checks, we have to aproximate all the type bindings
3030
// that we have found and seal them in a quoted.Type
3131
matchings.asOptionOfTuple.map { tup =>
3232
Tuple.fromArray(tup.toArray.map { // TODO improve performace
@@ -46,7 +46,7 @@ private[quoted] object Matcher {
4646
if (hasTypeSplices) {
4747
implicit val ctx: Context = internal.Context_GADT_setFreshGADTBounds(rootContext)
4848
val matchings = scrutineeTypeTree =#= patternTypeTree
49-
// After matching and doing all subtype check, we have to aproximate all the type bindings
49+
// After matching and doing all subtype checks, we have to aproximate all the type bindings
5050
// that we have found and seal them in a quoted.Type
5151
matchings.asOptionOfTuple.map { tup =>
5252
Tuple.fromArray(tup.toArray.map { // TODO improve performace
@@ -75,8 +75,8 @@ private[quoted] object Matcher {
7575
}
7676

7777
private def isFromAboveAnnotation(tree: Tree): Boolean = tree match {
78-
case New(tpt) => tpt.symbol == internal.Definitions_InternalQuoted_formAboveAnnot
79-
case annot => annot.symbol.owner == internal.Definitions_InternalQuoted_formAboveAnnot
78+
case New(tpt) => tpt.symbol == internal.Definitions_InternalQuoted_fromAboveAnnot
79+
case annot => annot.symbol.owner == internal.Definitions_InternalQuoted_fromAboveAnnot
8080
}
8181

8282
/** Check that all trees match with `mtch` and concatenate the results with && */

library/src/scala/tasty/reflect/CompilerInterface.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,8 +1496,8 @@ trait CompilerInterface {
14961496
/** Symbol of scala.internal.Quoted.patternBindHole */
14971497
def Definitions_InternalQuoted_patternBindHoleAnnot: Symbol
14981498

1499-
/** Symbol of scala.internal.Quoted.formAbove */
1500-
def Definitions_InternalQuoted_formAboveAnnot: Symbol
1499+
/** Symbol of scala.internal.Quoted.fromAbove */
1500+
def Definitions_InternalQuoted_fromAboveAnnot: Symbol
15011501

15021502
def Definitions_UnitType: Type
15031503
def Definitions_ByteType: Type

0 commit comments

Comments
 (0)