Function types versus arrays

Neal Gafter neal at gafter.com
Fri Feb 12 22:39:30 PST 2010


On Fri, Feb 12, 2010 at 8:22 PM, Reinier Zwitserloot
<reinier at zwitserloot.com> wrote:
> However, if function types aren't reified, then arrays are the least of my
> worries. Does that mean something like this:
> void print(#(Number)String formatter, Number number) {
>     System.out.println(formatter.(number));
> }
> void print(#(String)String formatter, String string) {
>     System.out.println(formatter.(string));
> }
> is not legal (if this is done like generics, the signatures are equal
> post-erasure, which is a compile error).

These signatures are distinct post-erasure, because the erasure of
their second parameters are distinct.


More information about the lambda-dev mailing list