|
rhs.substituteSymbols(old, new) leaves us with:
def loop#12225(x#12226: A#15491): scala#21.this.Unit#1615 =
loop#12225(x#12226)
In which the TermSymbol x#12226 has a stale info, pointing at
the A#7274, the class type parameter, rather than A#15491,
the corresponding type parameter of the synthetic backing
method.
I've improved `TreeSymSubstituter` to substitute not
only `Tree#{tpe, symbol}`, but also `DefTree#sym.info`.
The `pos` test that triggered the new code path are
listed here: https://gist.github.com/4575687
AFAICS, no special treatment of Function, Return, or Import
is needed in TreeSymSubstutor.
|