Include import prefixes on type error messages - DDC #33695
Labels
area-web-js
Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
web-dev-compiler
Similar to #33667 (CFE) and #33693 (VM).
Reproduction for DDC is simple. It's like 3 steps.
First, create a new directory, for a package. You'll need a whole package.
Next create a pubspec.yaml with lots of goodies:
Of course,
pub get
that jazz.Make a web app in two easy steps. So easy.
web/index.html
:web/main.dart
:Install webdev:
pub global active webdev
.Run
webdev serve
.We're almost there, home stretch.
Load up http://localhost:8080 in a browser.
Look at the JavaScript console. Click the expand buttons until you see:
OK, the issue is that that error message is a great clue if we're game for a puzzle. But for the more casual developer, I think we should show the prefix that they wanted to use:
This case I think illuminates how this would be useful: the Randoms are a red herring. The issue is that
Iterable<blah-blah>
is notList<blah-blah>
. (I'll open a separate issue for the mysterious MappedListIterable showing up in errors, a class that I neither wrote, nor can find in SDK docs 😮 .)The text was updated successfully, but these errors were encountered: