> Shouldn't the second method be considered as dead code and automatically 
> removed by GWT?
>

The following is just speculation as I don't know the compiler internals 
out of my head:

I assume thats because GWT will compile the source using JDT in order to 
get an AST that GWT can then optimize. During the JDT compilation the super 
source is used so JDT does not see a method definition 
Logger.getAnonymousLogger() and generates the error you are seeing. 

If you use code that actually compiles then GWT should also remove that 
dead code during its AST optimization passes and the final JS output should 
not contain your unused methodCompileNotOk(). Alternatively you can mark 
methodCompileNotOk() with @GwtIncompatible so that GWT ignores the method.

-- J.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to