Improve the error when imports are written before a part of
directive
#57044
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
With enhanced parts, it seems
import
s should be beforepart
directives, but they come afterpart of
directives. This makes some sense, but it's easy to get wrong. If I put an import after apart
, I get a clear error message:However the same is not true if I get a
part of
and import the wrong way around: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
.The text was updated successfully, but these errors were encountered: