Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong subtype only in --release (Dart 2.7.2) #2

Closed
jscholler opened this issue Mar 26, 2020 · 3 comments
Closed

Wrong subtype only in --release (Dart 2.7.2) #2

jscholler opened this issue Mar 26, 2020 · 3 comments

Comments

@jscholler
Copy link

Hello Rob,

I got this weird issue when I build with webdev build --release, I get this error right at the beginning of dispatching the event:
main.dart.js:395 Uncaught TypeError: Instance of 'minified:cm': type 'minified:cm' is not a subtype of type 'Listminified:cs'`

When building with webdev build --no-release or doing webdev serve, this does not happen.

After blindly poking around a bit, I noticed that the error disappeared when changing:
static void _dispatchResizes(JsArray<JsObject> entries, JsObject jsResizeObserver)
to
static void _dispatchResizes(JsArray entries, JsObject jsResizeObserver)

I don't know if this is a proper fix but it works for me :)

BTW, I get the same issue with ResizeObserver from the official dart:html

@robrbecker
Copy link
Owner

Hey, thanks for reporting this! I'll have to investigate your proposed solution but it looks like that could be all that's needed. Is there a bug filed for dart:html as well?

@robrbecker
Copy link
Owner

I did have a chance to verify this bug. It's currently a runtime type check that "goes away" if you compile with optimization level 3 (-O3). I'll still fix it though.

@robrbecker
Copy link
Owner

Fixed and released version 1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants