scala/scala — pull request #3573 by retronym (2014-02-22 09:53:22+00:00)
Title: SI-8234 Fix regression in override checks for sealed classes

adeffda25 changed `Symbol#isEffectivelyFinal` to help the optimizer
by inferring finality within sealed class hierarchies.

However, this change wasn't neccesarily welcome for other clients of
that method. In the enclosed test case, we see that overriding checks
in `RefChecks` regressed.

This commit moves the enhanced version into a new method and
selectively uses it in the optimizer (and the tail call optimizer).

Review by @adriaanm