Your assumption is true for Boolean and Double but not the other boxed 
types.

On Tuesday, August 9, 2016 at 10:39:53 AM UTC-4, Vassilis Virvilis wrote:
>
> From my understanding (which is not much) the whole point is moot. Looks 
> like java Boxed types (Boolean, Double, Integer) are mapped directly to JS 
> primitives so the need for the above code is gone. Is that right?
>
> If yes and just for the shake of syntax curiosity: what is the correct 
> syntax to invoke the booleanValue() of a Boolean object?
>
> Thanks for helping me clearing this up.
>
> On Tue, Aug 9, 2016 at 5:33 PM, Jens <[email protected] <javascript:>> 
> wrote:
>
>>
>> https://github.com/gwtproject/gwt/issues/9356 suggests that
>>>    value.@Boolean::booleanValue() is rejected but 
>>> value@Boolean::booleanValue()() works?
>>>
>>
>> Yes but they are two different things. The first syntax returns the JS 
>> function itself (method reference) while the second one executes the 
>> function and returns its return value. So you have changed the code from 
>> "Does the function exist on 'value'" to "execute the function (=> and throw 
>> a JS error if it does not exist)". 
>>
>> Method references are forbidden for Double, Boolean and String. Method 
>> calls are allowed.
>>
>> -- J. 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Vassilis Virvilis
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to