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

Improve the error when imports are written before a part of directive #57044

Open
DanTup opened this issue Nov 7, 2024 · 0 comments
Open

Improve the error when imports are written before a part of directive #57044

DanTup opened this issue Nov 7, 2024 · 0 comments
Labels
analyzer-ux area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request

Comments

@DanTup
Copy link
Collaborator

DanTup commented Nov 7, 2024

With enhanced parts, it seems imports should be before part directives, but they come after part of directives. This makes some sense, but it's easy to get wrong. If I put an import after a part, I get a clear error message:

image

However the same is not true if I get a part of and import the wrong way around:

image

The error makes it seem like I can't have imports in this file, but in reality I just need to put them after the part of.

@DanTup DanTup added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Nov 7, 2024
@scheglov scheglov added P3 A lower priority bug or feature request analyzer-ux labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-ux area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P3 A lower priority bug or feature request
Projects
None yet
Development

No branches or pull requests

2 participants