Idea how to implement VT/VO compatibility in JVM

Stéphane Épardaud stef at
Thu Jan 22 13:38:41 UTC 2015

On 01/22/2015 02:26 PM, Maurizio Cimadamore wrote:
> In other words, Collection<?> means Collection<? extends Object>. 
> Therefore, primitives and values are outside the domain supported by 
> the unbounded wildcard.
> To fix that, you need to change 'm' as follows:
> <any T> void m2(Collection<T> c) { ... }
> m(ls); //ok
> m(lo); //ok
> m(li); //ok
> m(lmpv); //ok
> Is this what you were asking?

Except you're again relying on compile-time available instantiations of 
`T`. Frameworks don't have those, they work by discovery as in my example.

More information about the valhalla-dev mailing list