Casting reference array to any-T array.

Michael Barker mikeb01 at gmail.com
Wed Jan 7 21:28:29 UTC 2015


>
> Yes, this is definitely unsound (and probably we should help by failing at
> compile time rather than runtime.)
>
> To fix your code, use the "new T[n]" syntax that gives you an array of the
> erasure of T for ref T and primitive arrays for primitive T (and an
> unchecked warning.)


Yep, I eventually figured out what I was missing.  Just wanted to get it
added to feedback on specialization.

Mike.


More information about the valhalla-dev mailing list