Been there, done that. No worries :) On Thu, Jun 4, 2009 at 7:09 PM, Mark Renouf <[email protected]> wrote:
> > Oh... man. Cancel that! > > Y'know it certainly felt like like of those "oh darn, I've been > editing the wrong file all along" moments, and it was... ugh. > > Sorry for the noise, pilot error indeed. > > On Jun 4, 6:36 pm, Mark Renouf <[email protected]> wrote: > > 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 -~----------~----~----~----~------~----~------~--~---
