Hmm not 100% sure but it looks intended.
-- How the @JsFunction is implemented in the AST:
https://gwt-review.googlesource.com/#/c/11960/8/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
How the Javascript function is generated that wraps the call to your @JsFunction Java SAM method:
https://gwt-review.googlesource.com/#/c/11960/8/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/JavaClassHierarchySetupUtil.java
So you can see the generated javascript function is calling the SAM method by providing itself as "this" (using samMethod.call(lambda, ..) ) and the proto is set to the Foo instance that has the samMethod defined.
-- J.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment