Eta expansion and unrestricted wildcard
Neal Gafter
neal at gafter.com
Tue Jul 8 00:02:26 PDT 2008
Zdenek-
This has now been fixed.
Regards,
Neal
On Sat, May 17, 2008 at 5:12 AM, <tronicek at fel.cvut.cz> wrote:
> Hi,
>
> unrestricted wildcard in a method reference does not compile:
>
> interface Saveable<T> {
> void saveAll();
> void save(T t);
> T restore();
> }
>
> public static void main(String[] args) throws Exception {
> // this is ok
> { Saveable<String> => void } p1 = { Saveable<?> s => s.saveAll(); };
> // this does not compile
> //{ Saveable<String> => void } p2 = Saveable<?>#saveAll();
> }
>
>
> Z.
> --
> Zdenek Tronicek
> Department of Computer Science and Engineering
> Prague tel: +420 2 2435 7410
> http://cs.felk.cvut.cz/~tronicek <http://cs.felk.cvut.cz/%7Etronicek>
>
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20080708/29ca5d41/attachment.html
More information about the closures-dev
mailing list