3 ms·
<B extends A> A upcast(Constrain<A,B> constrain As someone who doesn't know Java well, why is it that we need to pass a Constrain<A,B> into the function? We al
by plaguuuuuu 10y ago
<B extends A> A upcast(Constrain<A,B> constrain
As someone who doesn't know Java well, why is it that we need to pass a Constrain<A,B> into the function? We already know that for this method, B extends A
- lmm 10y agoTo allow B and A to be inferred based on the constrain passed in. Look at where upcast is called - it doesn't explicitly call bind.upcast<Something, Otherthing>(...), it just passes the values.