-
Notifications
You must be signed in to change notification settings - Fork 1.7k
errors thrown by constant evaluator are unreadable #33216
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
Comments
@kmillikin please select priority |
THank you @mraleph (and @kmillikin)! |
I don't think there's anything we need to put in Kernel for the VM to generate a better error. @a-siva can you reassign to someone on the VM team? (Also, consider whether this is in scope for Dart2Stable.) If it turns out we need to change something in Kernel, let us know. |
With https://dart-review.googlesource.com/c/sdk/+/63883 I get
then
and finally
Stuff like
might not be great, but |
Use positions already available in for instance AsExpressions, also adds new offsets in the kernel format to SuperInitializer and RedirectingInitializer. Bug: #33216 Change-Id: I542967ddc6ec782e6513d62fce038a49239e1622 Reviewed-on: https://dart-review.googlesource.com/63883 Commit-Queue: Jens Johansen <jensj@google.com> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
The error messages reported by Dart VM after the changes made by @jensjoha are consistent with what was being generated by Dart 1. |
@a-siva any updates for 2.1? |
See comment above, I believe this issue can be closed unless somebody disagrees with that. |
results in
Not that the top-most frame does not actually point to the location of the type error - it points to the invocation of
foo
within themain
.The type error itself is very different from how VM reports other similar type errors.
Other cases:
produces unreadable (notice double "Unhandled exception" and no location information on frame
#1
)while
produces
The text was updated successfully, but these errors were encountered: