Wanted to check here before creating a ticket. Here's the basic
sitation:
I took liberties with the names, but the structure is basically
unchanged :-)
public class MagicContext<T extends HasMagic<?>> {
T magical;
}
class Magical {
MagicContext context = createContext();
void needMagic() {
if (context.magical != null) {
useTheMagic();
}
}
void useTheMagic() {
Style style = context.magical.getElement().getStyle();
....set some styles...
}
}
Compile JS output (Pretty mode) for "needMagic()" looks like this:
style = dynamicCast(this.context.magical, 13).element.style;
Note the lack of a null check?
I've also tried with the null check within the "useTheMagic" method,
either way it doesn't matter because once it's inlined, it disapears.
Why would this be? Pilot error or compiler bug? I've tripled checked
I'm compiling the correct version, nothing is cached, etc etc.
My current theory is this is some bad interaction between bounded type-
args and inlining?
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---