@@ -815,11 +815,11 @@ trait Implicits { self: Typer =>
815815 EmptyTree
816816 }
817817
818- /** Create an anonymous class `new Object { type MonoType = ... }`
818+ /** Create an anonymous class `new Object { type MirroredMonoType = ... }`
819819 * and mark it with given attachment so that it is made into a mirror at PostTyper.
820820 */
821821 private def anonymousMirror (monoType : Type , attachment : Property .StickyKey [Unit ], span : Span )(implicit ctx : Context ) = {
822- val monoTypeDef = untpd.TypeDef (tpnme.MonoType , untpd.TypeTree (monoType))
822+ val monoTypeDef = untpd.TypeDef (tpnme.MirroredMonoType , untpd.TypeTree (monoType))
823823 val newImpl = untpd.Template (
824824 constr = untpd.emptyConstructor,
825825 parents = untpd.TypeTree (defn.ObjectType ) :: Nil ,
@@ -832,14 +832,14 @@ trait Implicits { self: Typer =>
832832
833833 /** The mirror type
834834 *
835- * <parent> { MonoType = <monoType; Label = <label> }
835+ * <parent> { MirroredMonoType = <monoType; MirroredLabel = <label> }
836836 */
837837 private def mirrorCore (parent : Type , monoType : Type , label : Name )(implicit ctx : Context ) =
838838 parent
839- .refinedWith(tpnme.MonoType , TypeAlias (monoType))
840- .refinedWith(tpnme.Label , TypeAlias (ConstantType (Constant (label.toString))))
839+ .refinedWith(tpnme.MirroredMonoType , TypeAlias (monoType))
840+ .refinedWith(tpnme.MirroredLabel , TypeAlias (ConstantType (Constant (label.toString))))
841841
842- /** An implied instance for a type of the form `Mirror.Product { type MonoType = T }`
842+ /** An implied instance for a type of the form `Mirror.Product { type MirroredMonoType = T }`
843843 * where `T` is a generic product type or a case object or an enum case.
844844 */
845845 lazy val synthesizedProductMirror : SpecialHandler =
@@ -868,8 +868,8 @@ trait Implicits { self: Typer =>
868868 val elemLabels = accessors.map(acc => ConstantType (Constant (acc.name.toString)))
869869 val mirrorType =
870870 mirrorCore(defn.Mirror_ProductType , monoType, cls.name)
871- .refinedWith(tpnme.ElemTypes , TypeAlias (TypeOps .nestedPairs(elemTypes)))
872- .refinedWith(tpnme.ElemLabels , TypeAlias (TypeOps .nestedPairs(elemLabels)))
871+ .refinedWith(tpnme.MirroredElemTypes , TypeAlias (TypeOps .nestedPairs(elemTypes)))
872+ .refinedWith(tpnme.MirroredElemLabels , TypeAlias (TypeOps .nestedPairs(elemLabels)))
873873 val modul = cls.linkedClass.sourceModule
874874 assert(modul.is(Module ))
875875 val mirrorRef =
@@ -879,18 +879,18 @@ trait Implicits { self: Typer =>
879879 }
880880 else EmptyTree
881881 }
882- formal.member(tpnme.MonoType ).info match {
882+ formal.member(tpnme.MirroredMonoType ).info match {
883883 case monoAlias @ TypeAlias (monoType) => mirrorFor(monoType)
884884 case _ => EmptyTree
885885 }
886886 }
887887
888- /** An implied instance for a type of the form `Mirror.Sum { type MonoType = T }`
888+ /** An implied instance for a type of the form `Mirror.Sum { type MirroredMonoType = T }`
889889 * where `T` is a generic sum type.
890890 */
891891 lazy val synthesizedSumMirror : SpecialHandler =
892892 (formal : Type , span : Span ) => implicit (ctx : Context ) =>
893- formal.member(tpnme.MonoType ).info match {
893+ formal.member(tpnme.MirroredMonoType ).info match {
894894 case TypeAlias (monoType) if monoType.classSymbol.isGenericSum =>
895895 val cls = monoType.classSymbol
896896 val elemTypes = cls.children.map {
@@ -925,7 +925,7 @@ trait Implicits { self: Typer =>
925925 }
926926 val mirrorType =
927927 mirrorCore(defn.Mirror_SumType , monoType, cls.name)
928- .refinedWith(tpnme.ElemTypes , TypeAlias (TypeOps .nestedPairs(elemTypes)))
928+ .refinedWith(tpnme.MirroredElemTypes , TypeAlias (TypeOps .nestedPairs(elemTypes)))
929929 val modul = cls.linkedClass.sourceModule
930930 val mirrorRef =
931931 if (modul.exists && ! cls.is(Scala2x )) ref(modul).withSpan(span)
@@ -935,12 +935,12 @@ trait Implicits { self: Typer =>
935935 EmptyTree
936936 }
937937
938- /** An implied instance for a type of the form `Mirror { type MonoType = T }`
938+ /** An implied instance for a type of the form `Mirror { type MirroredMonoType = T }`
939939 * where `T` is a generic sum or product or singleton type.
940940 */
941941 lazy val synthesizedMirror : SpecialHandler =
942942 (formal : Type , span : Span ) => implicit (ctx : Context ) =>
943- formal.member(tpnme.MonoType ).info match {
943+ formal.member(tpnme.MirroredMonoType ).info match {
944944 case monoAlias @ TypeAlias (monoType) =>
945945 if (monoType.termSymbol.is(CaseVal ) || monoType.classSymbol.isGenericProduct)
946946 synthesizedProductMirror(formal, span)(ctx)
0 commit comments