Hi Could you elaborate on the use case @jstype(isNative=false) and -generateJsInteropExports is __not__ specified in the command line.
Is there any valid use for such a combination? On Tue, Sep 13, 2016 at 6:41 PM, Thomas Broyer <[email protected]> wrote: > > On Tuesday, September 13, 2016 at 5:27:50 PM UTC+2, Kirill Prazdnikov > wrote: >> >> This means that the compiler must throw an error: >> >> If a type is not isNative=true >> and the type is never instantiated >> and the type is returned form JSNI\JsInterop >> >> right ? >> > > No, just like the compiler doesn't generate an error for other cases where > it's guaranteed you'll have an NPE at runtime, even without jsinterop. > > If your GwtNativeUtil.getBoundingClientRect(element) wasn't JSNI and > returned 'null' (for example, a typo where you write 'if (element != null) > return null;' instead of 'if (element == null) return null;' and somehow > the compiler can infer that 'element' won't ever be 'null'; or of course > the reverse: without the typo and the compiler somehow can infer that > 'element' will always be 'null'), then it'd generate the same code (just > without the call to getBoundingRect here). > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- Vassilis Virvilis -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
