Error: cannot extend JsFunction implementation

75 views
Skip to first unread message

Manuel Carrasco Moñino

unread,
May 24, 2016, 1:50:51 AM5/24/16
to google-web-tool...@googlegroups.com

Is there any reason why a Class implementing a JsFunction cannot be extended or it is a bug?

In the @JsFunction documentation there is nothing about this constrain.

@JsFunction
interface I {
  void call(...);
}
class A implements I {...}
class B extends A {...}

[ERROR] : 'A' cannot extend JsFunction implementation 'B'.


Thanks
- Manolo

Goktug Gokdogan

unread,
May 24, 2016, 2:21:15 AM5/24/16
to google-web-toolkit-contributors
Works as intended.

Any form of polymorphism is avoided in JsFunction design so that we could generate a simple javascript function out of it: https://gwt-review.googlesource.com/#/c/12810/

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, 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/CAM28XAuQi8iTbWcgUcMLSHOgYKbQqNOhwMAG-tLJFtZkTEqpig%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Manuel Carrasco Moñino

unread,
May 24, 2016, 3:12:34 AM5/24/16
to google-web-toolkit-contributors

Gotcha. So the javadoc should say something about this constrain

Thanks

Reply all
Reply to author
Forward
0 new messages