http://gwt-code-reviews.appspot.com/126817/diff/2006/2007
File dev/core/test/com/google/gwt/dev/jjs/impl/JsniRefLookupTest.java
(right):

http://gwt-code-reviews.appspot.com/126817/diff/2006/2007#newcode234
Line 234: JMethod res = (JMethod) lookup("test.Bar::foo(*)", errors);
It seems weird that this should work. If Bar didn't declare foo() (and
the lookup went up to the supertype Foo), this would fail to compile.
It breaks the otherwise-Java style of name lookups used by JSNI to care
about where the method is declared.  It also rewards the unnecessary
(and ugly) practice of re-defining a method overload just to make it the
"default".

It's simplest to explain to users that the @class::method(*) wildcard
syntax selects the one method out of the entire supertype/superinterface
hierarchy whose name is "method" without having to get into discussions
about which type a method is declared on.

Also, on that vein, add test code for looking up wildcards on
interfaces.

http://gwt-code-reviews.appspot.com/126817

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

Reply via email to