lampepfl/dotty — pull request #186 by odersky (2014-10-12 07:45:40+00:00)
Title: Transform/getters setters

This commit unifies the very much diverging branches of pattern matcher and other transformations, i.e. capturedVars/constructors/gettersSetters by rebasing the essence of gettersSetters on pattern matcher. It turned out that pattern matcher had quite a few tests turned off before erasure. That has been fixed. The new branch has the same test coverage as the previous transformation branches.

By extending test coverage, two breakages were noticed.

1) LazyVals causes again problems, which are hard to track down. Since it will change place in the pipeline anyway I disabled it again.

2) deep tools compile also caused problems when extended beyond erasure. I am investigating those.

In retrospect it was a LOT of work to achieve confluence of the two branches. I spent overall 14 hours on it. Doing the following steps:

1) Tried to rebase getters setters onto pattern matcher. Lots of errors, impossible to track down. Only later it dawned on me that a good part of these were due to different test coverage in the two branches.

2) Merged pattern matcher into getters setters. This also did not work but then I could take the merge and commit small bits of it individually that worked until I had a working system. Almost declared victory but when I was done I found that the pattern matcher had already been merged. So I fell back to

3) Cherry-picked the commits that were not yet integrated by pattern matcher in some way or other on top of pattern matcher. The result was not working, of course. Then, merged the result of 2) into it and committed in little bits until everything worked again.

The commit sequence you are seeing is the result of 3).

In retrospect I think it would have been easier to rebase pattern matcher over getters setters. Lesson for the future: When in doubt pick the version with the higher test coverage as a basis.

I suggest we take this branch as the basis of all future work. It has diverged so much from master that any commits against master would have to be cherry-picked. Rebasing is useless.