LGTM (FWIW, and speaking only about the API)

http://gwt-code-reviews.appspot.com/864801/diff/3001/4034
File user/test/com/google/gwt/user/client/ui/SimplePanelTest.java
(right):

http://gwt-code-reviews.appspot.com/864801/diff/3001/4034#newcode35
user/test/com/google/gwt/user/client/ui/SimplePanelTest.java:35:
p.setWidget(null);
On 2010/09/12 23:14:24, rjrjr wrote:
On 2010/09/12 13:43:57, jlabanca wrote:
> Is that because Widget extends IsWidget?  I assume it uses the
IsWidget
version
> then, and in general does a runtime check?

Parameter ambiguity is all decided at compile time in Java, based on
variable
type. Receiver choice is dynamic, overload resolution is static. And
actually,
the more specific version wins, setWidget(Widget) in this case.

FYI, this is defined in JLS (i.e. it's not just a JDK implementation
detail), and yes that's because Widget extends IsWidget:
http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12.2.5

http://gwt-code-reviews.appspot.com/864801/diff/29001/30025
File user/src/com/google/gwt/user/client/ui/TabLayoutPanel.java (right):

http://gwt-code-reviews.appspot.com/864801/diff/29001/30025#newcode195
user/src/com/google/gwt/user/client/ui/TabLayoutPanel.java:195: public
void add(IsWidget w, String text) {
Javadoc?

http://gwt-code-reviews.appspot.com/864801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to