Sunday, October 6, 2019

Re: ClassCastException in some browser, but not others (



On Sun, Oct 6, 2019 at 8:30 PM Thomas Broyer <t.broyer@gmail.com> wrote:
Wrt the cast error, it might be that the object in 'result' is not "instanceof $wnd.IDBDatabase". This would be a bug in Safari; and uncheckedCast is indeed the workaround.

Actually I believe it is a bug in closures externs from which elemental2 is generated. Without checking my guess is that IDBDatabase is annotated with a @constructor tag rather than a @interface which is incorrect as the spec defines it as an interface [1]. Unfortunately, this is a common problem with some of the closure compiler externs. It does not impact people using closure compiler. Unfortunately, the jsinterop-generator will generate incorrect code if the extern is incorrectly annotated.


--
Cheers,

Peter Donald

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/CACiKNc4je86w4xxRJ76P__d18s1DYN6Dq5JMd5%2Brc45x5Y5Dwg%40mail.gmail.com.

No comments:

Post a Comment