@@ -859,11 +859,11 @@ trait Implicits { self: Typer =>
859859 EmptyTree
860860 }
861861
862- /** Create an anonymous class `new Object { type MonoType = ... }`
862+ /** Create an anonymous class `new Object { type MirroredMonoType = ... }`
863863 * and mark it with given attachment so that it is made into a mirror at PostTyper.
864864 */
865865 private def anonymousMirror (monoType : Type , attachment : Property .StickyKey [Unit ], span : Span )(implicit ctx : Context ) = {
866- val monoTypeDef = untpd.TypeDef (tpnme.MonoType , untpd.TypeTree (monoType))
866+ val monoTypeDef = untpd.TypeDef (tpnme.MirroredMonoType , untpd.TypeTree (monoType))
867867 val newImpl = untpd.Template (
868868 constr = untpd.emptyConstructor,
869869 parents = untpd.TypeTree (defn.ObjectType ) :: Nil ,
@@ -876,14 +876,14 @@ trait Implicits { self: Typer =>
876876
877877 /** The mirror type
878878 *
879- * <parent> { MonoType = <monoType; Label = <label> }
879+ * <parent> { MirroredMonoType = <monoType; MirroredLabel = <label> }
880880 */
881881 private def mirrorCore (parent : Type , monoType : Type , label : Name )(implicit ctx : Context ) =
882882 parent
883- .refinedWith(tpnme.MonoType , TypeAlias (monoType))
884- .refinedWith(tpnme.Label , TypeAlias (ConstantType (Constant (label.toString))))
883+ .refinedWith(tpnme.MirroredMonoType , TypeAlias (monoType))
884+ .refinedWith(tpnme.MirroredLabel , TypeAlias (ConstantType (Constant (label.toString))))
885885
886- /** An implied instance for a type of the form `Mirror.Product { type MonoType = T }`
886+ /** An implied instance for a type of the form `Mirror.Product { type MirroredMonoType = T }`
887887 * where `T` is a generic product type or a case object or an enum case.
888888 */
889889 lazy val synthesizedProductMirror : SpecialHandler =
@@ -912,8 +912,8 @@ trait Implicits { self: Typer =>
912912 val elemLabels = accessors.map(acc => ConstantType (Constant (acc.name.toString)))
913913 val mirrorType =
914914 mirrorCore(defn.Mirror_ProductType , monoType, cls.name)
915- .refinedWith(tpnme.ElemTypes , TypeAlias (TypeOps .nestedPairs(elemTypes)))
916- .refinedWith(tpnme.ElemLabels , TypeAlias (TypeOps .nestedPairs(elemLabels)))
915+ .refinedWith(tpnme.MirroredElemTypes , TypeAlias (TypeOps .nestedPairs(elemTypes)))
916+ .refinedWith(tpnme.MirroredElemLabels , TypeAlias (TypeOps .nestedPairs(elemLabels)))
917917 val modul = cls.linkedClass.sourceModule
918918 assert(modul.is(Module ))
919919 val mirrorRef =
@@ -923,18 +923,18 @@ trait Implicits { self: Typer =>
923923 }
924924 else EmptyTree
925925 }
926- formal.member(tpnme.MonoType ).info match {
926+ formal.member(tpnme.MirroredMonoType ).info match {
927927 case monoAlias @ TypeAlias (monoType) => mirrorFor(monoType)
928928 case _ => EmptyTree
929929 }
930930 }
931931
932- /** An implied instance for a type of the form `Mirror.Sum { type MonoType = T }`
932+ /** An implied instance for a type of the form `Mirror.Sum { type MirroredMonoType = T }`
933933 * where `T` is a generic sum type.
934934 */
935935 lazy val synthesizedSumMirror : SpecialHandler =
936936 (formal : Type , span : Span ) => implicit (ctx : Context ) =>
937- formal.member(tpnme.MonoType ).info match {
937+ formal.member(tpnme.MirroredMonoType ).info match {
938938 case TypeAlias (monoType) if monoType.classSymbol.isGenericSum =>
939939 val cls = monoType.classSymbol
940940 val elemTypes = cls.children.map {
@@ -969,7 +969,7 @@ trait Implicits { self: Typer =>
969969 }
970970 val mirrorType =
971971 mirrorCore(defn.Mirror_SumType , monoType, cls.name)
972- .refinedWith(tpnme.ElemTypes , TypeAlias (TypeOps .nestedPairs(elemTypes)))
972+ .refinedWith(tpnme.MirroredElemTypes , TypeAlias (TypeOps .nestedPairs(elemTypes)))
973973 val modul = cls.linkedClass.sourceModule
974974 val mirrorRef =
975975 if (modul.exists && ! cls.is(Scala2x )) ref(modul).withSpan(span)
@@ -979,12 +979,12 @@ trait Implicits { self: Typer =>
979979 EmptyTree
980980 }
981981
982- /** An implied instance for a type of the form `Mirror { type MonoType = T }`
982+ /** An implied instance for a type of the form `Mirror { type MirroredMonoType = T }`
983983 * where `T` is a generic sum or product or singleton type.
984984 */
985985 lazy val synthesizedMirror : SpecialHandler =
986986 (formal : Type , span : Span ) => implicit (ctx : Context ) =>
987- formal.member(tpnme.MonoType ).info match {
987+ formal.member(tpnme.MirroredMonoType ).info match {
988988 case monoAlias @ TypeAlias (monoType) =>
989989 if (monoType.termSymbol.is(CaseVal ) || monoType.classSymbol.isGenericProduct)
990990 synthesizedProductMirror(formal, span)(ctx)
0 commit comments