Thought on typecase

I find it uncomfortable that it is not easy to select a parameterized
type with a typecase. Suppose:
trait X[\T extends Y\] end
then I can't specify a clause that matches any instantiation of X. It
is possible to create an additional nonparametric trait that X
extends, but it isn't practical nor nice to do so just to be able to
use typecase. I could do
trait X[\T extends Y\] extends X[\Y\] end
but leads to a stack overflow if I then use X[\Y\] (just as trait Z
extends Z end does). I can create a ticket for this if it's
appropriate, but the question could be whether it is legal to declare
that a trait extends itself (doesn't it always?).


Gmane