Valhalla EG meeting notes March 28, 2018

Brian Goetz brian.goetz at oracle.com
Sat May 12 14:42:35 UTC 2018


> Specific issues with arrays and sub typing:

I’ve lost track of the current state of this; is a V[] yet a subtype of Object[], as object classes are?  

If values are to play nicely with erased generics, we have to get there.  For example:

    <T> void sort(T[] elements, Comparator<T> c) { … }

This erases to

    void sort(Object[] elements, Comparator c) { .. }

So to sort an array of V, we need V[] <: Object[].  




More information about the valhalla-spec-observers mailing list