Skip to content

Commit fa93686

Browse files
committed
Align TypeRepr module and method trait names
1 parent bbe871d commit fa93686

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

compiler/src/dotty/tools/dotc/quoted/QuoteContextImpl.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,7 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext, scala.intern
15671567

15681568
type TypeRepr = dotc.core.Types.Type
15691569

1570-
object TypeRepr extends TypeModule:
1570+
object TypeRepr extends TypeReprModule:
15711571
def of[T <: AnyKind](using qtype: scala.quoted.Type[T]): TypeRepr =
15721572
qtype.asInstanceOf[scala.internal.quoted.Type[TypeTree]].typeTree.tpe
15731573
def typeConstructorOf(clazz: Class[?]): TypeRepr =
@@ -1592,7 +1592,7 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext, scala.intern
15921592
dotc.core.Symbols.getClassIfDefined(clazz.getCanonicalName).typeRef
15931593
end TypeRepr
15941594

1595-
object TypeMethodsImpl extends TypeMethods:
1595+
object TypeReprMethodsImpl extends TypeReprMethods:
15961596
extension (self: TypeRepr):
15971597
def showExtractors: String =
15981598
Extractors.showType(using QuoteContextImpl.this)(self)
@@ -1641,7 +1641,7 @@ class QuoteContextImpl private (ctx: Context) extends QuoteContext, scala.intern
16411641
def appliedTo(targs: List[TypeRepr]): TypeRepr =
16421642
dotc.core.Types.decorateTypeApplications(self).appliedTo(targs)
16431643
end extension
1644-
end TypeMethodsImpl
1644+
end TypeReprMethodsImpl
16451645

16461646
type ConstantType = dotc.core.Types.ConstantType
16471647

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ class ReifyQuotes extends MacroTransform {
217217
def mkConst(tss: List[List[Tree]]) = {
218218
val reflect = tss.head.head.select("reflect".toTermName)
219219
val typeRepr = reflect.select("TypeRepr".toTermName).select("typeConstructorOf".toTermName).appliedTo(classTree)
220-
reflect.select("TypeMethods".toTermName).select("extension_asType".toTermName).appliedTo(typeRepr).asInstance(typeType)
220+
reflect.select("TypeReprMethods".toTermName).select("extension_asType".toTermName).appliedTo(typeRepr).asInstance(typeType)
221221
}
222222
Closure(meth, mkConst).withSpan(body.span)
223223

library/src/scala/tasty/Reflection.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,20 +1742,20 @@ trait Reflection { reflection =>
17421742
/** A type, type constructors, type bounds or NoPrefix */
17431743
type TypeRepr
17441744

1745-
val TypeRepr: TypeModule
1745+
val TypeRepr: TypeReprModule
17461746

1747-
trait TypeModule { this: TypeRepr.type =>
1747+
trait TypeReprModule { this: TypeRepr.type =>
17481748
/** Returns the type or kind (TypeRepr) of T */
17491749
def of[T <: AnyKind](using qtype: scala.quoted.Type[T]): TypeRepr
17501750

17511751
/** Returns the type constructor of the runtime (erased) class */
17521752
def typeConstructorOf(clazz: Class[?]): TypeRepr
17531753
}
17541754

1755-
given TypeMethods as TypeMethods = TypeMethodsImpl
1756-
protected val TypeMethodsImpl: TypeMethods
1755+
given TypeReprMethods as TypeReprMethods = TypeReprMethodsImpl
1756+
protected val TypeReprMethodsImpl: TypeReprMethods
17571757

1758-
trait TypeMethods {
1758+
trait TypeReprMethods {
17591759
extension (self: TypeRepr):
17601760

17611761
/** Shows the tree as extractors */

0 commit comments

Comments
 (0)