From c2760ecbddf0be5ca26ab187a60526cf4c05ef6c Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Fri, 21 Sep 2012 16:42:07 -0400 Subject: [PATCH] AbsTypeTag -> WeakTypeTag and converted more settings --- util/appmacro/ContextUtil.scala | 2 +- util/appmacro/Instance.scala | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/util/appmacro/ContextUtil.scala b/util/appmacro/ContextUtil.scala index ad66c84e2..3fd45207a 100644 --- a/util/appmacro/ContextUtil.scala +++ b/util/appmacro/ContextUtil.scala @@ -27,7 +27,7 @@ final class ContextUtil[C <: Context](val ctx: C) def getPos(sym: Symbol) = if(sym eq null) NoPosition else sym.pos - def atypeOf[T](implicit att: AbsTypeTag[T]): Type = att.tpe + def atypeOf[T](implicit att: WeakTypeTag[T]): Type = att.tpe /** Constructs a unique term name with the given prefix within this Context. * (The current implementation uses Context.fresh, which increments*/ diff --git a/util/appmacro/Instance.scala b/util/appmacro/Instance.scala index e03a29cb2..1dd51e26b 100644 --- a/util/appmacro/Instance.scala +++ b/util/appmacro/Instance.scala @@ -18,7 +18,7 @@ trait Instance } trait Convert { - def apply[T: c.AbsTypeTag](c: scala.reflect.macros.Context)(in: c.Tree): c.Tree + def apply[T: c.WeakTypeTag](c: scala.reflect.macros.Context)(in: c.Tree): c.Tree } trait MonadInstance extends Instance { @@ -81,7 +81,7 @@ object Instance * this should be the argument wrapped in Right. */ def contImpl[T](c: Context, i: Instance with Singleton, convert: Convert, builder: TupleBuilder)(t: Either[c.Expr[T], c.Expr[i.M[T]]])( - implicit tt: c.AbsTypeTag[T], it: c.TypeTag[i.type]): c.Expr[i.M[T]] = + implicit tt: c.WeakTypeTag[T], it: c.TypeTag[i.type]): c.Expr[i.M[T]] = { import c.universe.{Apply=>ApplyTree,_} @@ -203,7 +203,7 @@ object Instance tree match { case ApplyTree(TypeApply(fun, t :: Nil), qual :: Nil) if isWrapper(fun) => - val tag = c.AbsTypeTag(t.tpe) + val tag = c.WeakTypeTag(t.tpe) addType(t.tpe, convert(c)(qual)(tag) ) case _ => super.transform(tree) }