-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Erroneous RangeError when compiling to WASM #55817
Comments
@Rexios80 – confirm 3.5.0 (build 3.5.0-167.0.dev) – right? |
I've started debugging this, but the package cannot be built right now without making some changes in the dependencies, see flyerhq/flutter_chat_ui#596 (comment). |
% flutter --version
Flutter 3.22.0-43.0.pre.18 • channel [user-branch] • unknown source
Framework • revision 7b51c0c336 (10 minutes ago) • 2024-05-23 08:55:23 -0400
Engine • revision 8b094fbb94
Tools • Dart 3.5.0 (build 3.5.0-178.0.dev) • DevTools 2.36.0-dev.10 |
I think this is an incorrect optimization: We see that the => cl/368302 should fix this. |
Filed cherry-pick request for stable: #55853 |
…t if index is in-bounds We have an optimization that will do list lookups at compile time when the receiver is a constant list and the index is a constant integer. => We should only perform this optimization if index is in-bounds. => If it's out-of-bounds it should be a [RangeError] thrown at runtime (if that code is ever executed) Bug: #55817 Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/368302 Cherry-pick-request: #55853 Change-Id: I6a8b8ebd4ec0917d963e425fb0202aaef8d19bbd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368304 Reviewed-by: Slava Egorov <[email protected]> Reviewed-by: Ömer Ağacan <[email protected]> Commit-Queue: Martin Kustermann <[email protected]>
flyerhq/flutter_chat_ui#596
As far as I can tell, this is perfectly valid Dart code failing to compile to WASM
See also: flutter/flutter#148617
The text was updated successfully, but these errors were encountered: