truth0/truth — pull request #95 by cgruber (2014-05-21 07:32:01+00:00)
Title: Fix named() for array-types.

The simplified generics that were originally used (but weren't used for, say, collections) caused the concrete type to be ignored and the abstract parent type returned from named().

In short, I had to restructure AbstractArraySubject so that implementers pass themselves as a type parameter, which filters back up to "S extends Subject". This lets methods in Subject that return S actually return the concrete subtype. AbstractArraySubject was short-circuiting this by interposing a concrete type instead of propagating the type variable.