Possible bug with method references when doing this::foo

49 views
Skip to first unread message

Ali Akhtar

unread,
Feb 13, 2015, 9:47:29 AM2/13/15
to google-web-tool...@googlegroups.com
In a project, when I do the following:

SomeClass.someMethod( this::handleResult);


I get :  com.google.gwt.event.shared.UmbrellaException: Exception caught: (ReferenceError) : xFf_g$ is not defined

But when I replace the above line with:

SomeClass.someMethod( r-> handleResult(r) );


That works fine. 

It appears that the use of 'this' is causing some issues due to javascript's crappiness. Other method references work fine, I only encounter this when I use this::methodName

Ye Wang

unread,
Feb 13, 2015, 12:17:33 PM2/13/15
to google-web-tool...@googlegroups.com
We wrote a small test case with this::foo, but did not see any problems.

Could you provide more details so that we can reproduce the bug?

Did you run with the latest trunk? We just fixed a bug in GwtAstBuilder and we guess that it might be a possible cause to the bug in method reference.

Ali Akhtar

unread,
Feb 13, 2015, 1:17:42 PM2/13/15
to google-web-tool...@googlegroups.com

I am on the temporary maven snapshot repo that's being hosted on github. But it builds every 24 hrs so I'm guessing that it may not yet have the patch for this bug. If its occurring tomorrow, I'll create a test case.

Thanks.

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/WFwx1VIAjSc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/09b286be-96d8-4208-b9ff-fb2f7d82a8c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages