scala/scala — pull request #2000 by adriaanm (2013-01-28 23:06:04+00:00)
Title: [backport] SI-5378, unsoundness with type bounds in refinements.

As the comment says:

Not enough to look for abstract types; have to recursively check
the bounds of each abstract type for more abstract types. Almost
certainly there are other exploitable type soundness bugs which
can be seen by bounding a type parameter by an abstract type which
itself is bounded by an abstract type.

SPECIAL: BUY ONE UNSOUNDNESS, GET ONE FREE

In refinement types, only the first parameter list of methods
was being analyzed for unsound uses of abstract types. Second
parameter list and beyond had free unsoundness reign. That bug
as well is fixed here.