scala/scala — pull request #2248 by retronym (2013-03-13 14:52:02+00:00)
Title: SI-6900 Tail call elimination + dependent method type crasher

The primary contribution of this change is best expressed as a diff:

```
% cat sandbox/test.scala
trait U { type A }
object Test {
def foo(u: U)(as: List[Any]): u.A = ???
}

% diff <(scalac210 -uniqid -Xprint:uncurry sandbox/test.scala) <(qbin/scalac -uniqid -Xprint:uncurry sandbox/test.scala)
...
< def foo#7375(u#12217: U#7060, as#12218: List#11817[Any#3337]): u#12835.A#7371 = scala#23.this.Predef#832.???#6656()
---
> def foo#7421(u#12273: U#7106, as#12274: List#11294[Any#3337]): u#12273.A#7417 = scala#21.this.Predef#1084.???#6702()
```

The symbols of the `ValDef`s in the tree agree with the (cloned) symbols in the method type that was generated by the uncurry `InfoTransformer`.

One corner of the compiler universe fares a little better at the "[usual grand problem of keeping trees, symbols, and types in tune with one another](https://groups.google.com/d/msg/scala-internals/DwjBfws47Y8/8n7eaWMlDUIJ)".

I'm quoting @paulp, which is a nice thing to do before I ask him to review. In particular, should we (and, where could we) plug `substituteInfoParamsIntoDefDef` into the tree transformers of all phases that install info transformers?

This PR also includes rework of SI-6135 which became apparent to me after spending more time in `uncurry` and was closely related to this change.