Using of AdditionalBound in cast expressions
This can be compiled:
Object x = (Number&Serializable)~0;
This also can be compiled:
void method()
{
method2((Number&Serializable)~0);
}
<T extends Number&Serializable> void method2(T x)
{
}
An example where the cast is actually needed:
void method(Object o)
{
method2((List&AutoCloseable)o);
}
<T extends List&AutoCloseable> void method2(T v)
{
}