VerifyError was thrown by "() -> f1.invoke()"

bitter_fox bitterfoxc at gmail.com
Fri Dec 2 03:30:10 PST 2011


Oh, that's fine.
Thank you for teaching.

bitter_fox

2011/12/2 Maurizio Cimadamore <maurizio.cimadamore at oracle.com>

> On 02/12/11 05:39, bitter_fox wrote:
>
>> class Main
>> {
>>     interface Functional0<RET>
>>     {
>>         public RET invoke();
>>     }
>>
>>     public static String getString()
>>     {
>>         return "Hello Lambda World";
>>     }
>>
>>     public static void main(String[] args)
>>     {
>>         Functional0<String>  f1 = Main#getString;
>>         Functional0<String>  f2 = () ->  (String)f1.invoke(); // OK
>>         Functional0<String>  f3 = () ->  f1.invoke(); // VerifyError
>>
>>         Functional0<String>  f4 = f1#invoke; // VerifyError
>>     }
>> }
>>
> This works fine with the latest version of the compiler bits (available in
> the mercurial repository).
>
> Maurizio
>


More information about the lambda-dev mailing list