RFR: Compiler error for calling the method which returns void

ShinyaYoshida bitterfoxc at gmail.com
Thu Dec 11 00:22:23 UTC 2014


Thank you for your fix.
Your fix works well.

shinyafox
ShinyaYoshida

2014-12-11 3:10 GMT+09:00 Robert Field <robert.field at oracle.com>:

> shinyafox,
>
> Thanks for reporting this.
> Generating a void method will indeed give the desired null out of invoke,
> but I am more comfortable, for futures, in keeping the do_it signature
> stable.  With the API-based implementation, there is also no longer an,
> external to WrapFactory, need for prefix/suffix so I've implemented the fix
> somewhat differently.  I've pushed the fix.
>
> Thanks,
> Robert
>
>
>
>
> On 12/10/14 08:55, bitter_fox wrote:
>
>> Hi, Robert.
>>
>>  From 2648, calling the method which returns void makes compiler error:
>> -> System.out.println("legal call")
>> (...)
>> +++++WRAP
>> package REPL;
>> public class $REPL2 {
>>      public static Object do_it() throws Throwable {
>>          System.out.println("legal call");
>>      }
>> }
>>
>> -----
>> |  Error --
>> |  missing return statement
>> |  System.out.println("legal call");
>>
>> Please review my patch:
>> webrev: http://cr.openjdk.java.net/~shinyafox/kulla/2/webrev.00/
>>
>> Regards,
>> shinyafox
>> ShinyaYoshida(@bitter_fox)
>>
>
>


More information about the kulla-dev mailing list