-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed as duplicate of#60424
Closed as duplicate of#60424
Copy link
Labels
area-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
There are two issues in the code below.
- No error in both CFE and the analyzer in
test1 - No error in CFE in
test2
test1() {
late int i;
if (2 > 1) {
for (Never n in <dynamic>[i = 42]) {} // Analyzer warning "The value of the local variable 'n' isn't used."
}
i; // Definitely unassigned but no error in either CFE and the analyzer
}
test2(Never n) {
late int i;
if (2 > 1) {
for (n in <dynamic>[i = 42]) {}
}
i; // Definitely unassigned. Error in the analyzer, no error in CFE
}Dart SDK version: 3.8.0-205.0.dev (dev) (Tue Mar 18 21:02:26 2025 -0700) on "windows_x64"
Metadata
Metadata
Assignees
Labels
area-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