Skip to content

Flow analysis. The body of while(false)... is dead code #60322

Closed as not planned
@sgrekhov

Description

@sgrekhov

Thanks to @eernstg for helping with finding this issue. No expected error below in either CFE or the analyzer.

main() {
  late int n;
  while (false) {
    n = 42;
  }
  n;  // Definitely unassigned but no expected error
//^
// [analyzer] unspecified
// [cfe] unspecified
}

Dart SDK version: 3.8.0-174.0.dev (dev) (Mon Mar 10 21:06:07 2025 -0700) on "windows_x64"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.model-flowImplementation of flow analysis in analyzer/cfe

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions