LGTM tentatively (I don't think my comments on weird implicit object
supertypes will actually have any real affect on GWT programs)



http://gwt-code-reviews.appspot.com/1312801/diff/3001/4001
File dev/core/src/com/google/gwt/dev/jjs/ast/JArrayType.java (left):

http://gwt-code-reviews.appspot.com/1312801/diff/3001/4001#oldcode82
dev/core/src/com/google/gwt/dev/jjs/ast/JArrayType.java:82:
Scott, technically doesn't an array have a super-class as well? If you
have type Bar[], then of course, the leaf type Bar can have a
super-class (e.g. Foo), but the array itself extends java.lang.Object,
that's why you can pass array references to any method accepting an
Object.

Also, IIRC, array types in Java implicitly implement Cloneable,
Serializable, and maybe some others in later JDKs, but perhaps JDT
supplies this automatically?

http://gwt-code-reviews.appspot.com/1312801/diff/3001/4004
File dev/core/src/com/google/gwt/dev/jjs/ast/JInterfaceType.java
(right):

http://gwt-code-reviews.appspot.com/1312801/diff/3001/4004#newcode36
dev/core/src/com/google/gwt/dev/jjs/ast/JInterfaceType.java:36: return
null;

I haven't tried this in a debugger, but won't an interface implicitly
have java.lang.Object as a superClass? Any expression accepting an
Object will accept an interface I, likewise, you can invoke
wait()/notify()/toString()/etc on any interface (statically)

On 2011/01/21 16:32:35, scottb wrote:
Yes, but super interfaces are handled through
JDeclaredType.getImplements().
The Java language is slightly misleading in that classes "extend"
class and
"implement" interfaces, whereas interfaces "extend" interfaces -- but
the latter
means essentially "implements".

http://gwt-code-reviews.appspot.com/1312801/diff/3001/4012
File dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java
(right):

http://gwt-code-reviews.appspot.com/1312801/diff/3001/4012#newcode107
dev/core/src/com/google/gwt/dev/jjs/impl/ControlFlowAnalyzer.java:107:
classType.getSuperClass(), dims);
Not that it would change anything, but I think T[] implies
java.lang.Object should be rescued as well, but it's unlikely it would
ever not be rescued somewhere else anyway. :)

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

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

Reply via email to