Saturday, February 18, 2012

GWT compiler bug?

I've stumbled across what seems like a compiler bug to me.

Accidentally I had one unused import statement (and it was an
interface) in one GWT client facing interface file. The unused import
was a type NOT in the GWT client facing code. The compiler generated
no errors or warnings even in strict mode, and it built the final JS/
HTML output just fine. However at runtime the 4 types that happened
to use the object that had the unused import failed to get
constructed.

It seems invalid imports should be caught by the GWT compiler and
either fail the build or in this case since the import was not used it
could just emit a warning and ignore the import. It serves no purpose
to accept it and generate invalid JS.

Has anyone seen this before? It seems this could happen often unless
someone has a tool to cleanup imports.

-Dave

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate