scala/scala — pull request #3535 by adriaanm (2014-02-15 01:33:48+00:00)
Title: SI-7475 use intersection type for pattern type

Usually, the type of a pattern binder is an intersection of
the scrutinee type and the pattern type.

We used to "simplify" this intersection to eliminate
"redundancies", so that `intersect(Sub, Super)` will just
be `Sub` (where `Sub` <:< `Super`).

But, if we are nested in `Super` there is an observable difference
between `Sub` and `Sub with Super`. Only the latter will allow
use to select private members of `Super`.