scala/scala — pull request #3292 by xeno-by (2013-12-19 22:02:41+00:00)
Title: duplicates arguments to macro typer APIs

This commit continues the tendency set by the parent commit to duplicate
as much as possible in order to avoid potential confusion that users
might run into when compiler internals start leaking.

Here we plumb another way that by-reference sharing of trees might bite
unsuspecting macro writers. Previously we have duplicated macro expansions,
macro arguments, c.macroApplication, and now it’s arguments to typeCheck
and resetAttrs.

There is still an unlikely situation when someone gets to c.enclosingXXX
and then starts typechecking around, but that’s left for future work,
as it’s yet unclear what to do with c.enclosingXXX APIs.