resetAllAttrs?

On Monday, January 6, 2014, Jason Zaugg wrote:

> In src/reflect/scala/reflect/api/StandardLiftables.scala:
>
> > +    val T = weakTypeOf[T]
> > +    val symbol = T.typeSymbol
> > +    if (!symbol.asClass.isCaseClass)
> > +      c.abort(c.enclosingPosition, s"$symbol is not a case class")
> > +    def fields(tpe: Type) = tpe.declarations.collectFirst {
> > +      case m: MethodSymbol if m.isPrimaryConstructor ⇒ m
> > +    }.get.paramss.head.map { field ⇒
> > +      val name = field.name
> > +      val typeSign = tpe.declaration(name).typeSignature
> > +      name → typeSign
> > +    }
> > +    def select(fullName: String) = {
> > +      val head :: tail = fullName.split("\\.").toList
> > +      tail.foldLeft[Tree](Ident(TermName(head))){ (tree, name) ⇒
> > +        Select(tree, TermName(name))
> > +      }
>
>  Binding by symbol is less reliable than FQNs
>
> For references to static symbols, I'm not aware of any downsides to
> symbolic binding.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/scala/scala/pull/3326/files#r8663356>
> .
>