-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.model-flowImplementation of flow analysis in analyzer/cfeImplementation of flow analysis in analyzer/cfe
Description
Errors below are not reported either by the analyzer or CFE.
test(Never n) {
late int i;
if (1 > 2) {
do {
} while (n);
i = 42;
}
i; // Definitely unassigned but no error
}Another example
test(Never n) {
late int i;
if (1 > 2) {
do {
i = 42;
} while (n);
}
i; // Definitely unassigned but no error
}Note that the code below works
test(Never n) {
late int i;
if (1 > 2) {
do {
i = 42;
n;
} while (false);
}
i; // Definitely unassigned. Ok, the error the is reported.
}Dart SDK version: 3.8.0-197.0.dev (dev) (Sat Mar 15 17:07:22 2025 -0700) on "windows_x64"
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.model-flowImplementation of flow analysis in analyzer/cfeImplementation of flow analysis in analyzer/cfe