Skip to content

co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_* fail #42232

@scheglov

Description

@scheglov

I see new co19 tests that exercise functionality for which I cannot find specification. @leafpetersen Is it in the flow analysis spec and I don't look well?

co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_A01_t01
co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_A01_t03
co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_A01_t07
co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_A02_t01
co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_A02_t02
co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_A02_t04
co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_A03_t03
co19/LanguageFeatures/nnbd/flow-analysis/reachability_break_A03_t04
co19/LanguageFeatures/nnbd/flow-analysis/reachability_continue_A01_t07
co19/LanguageFeatures/nnbd/flow-analysis/reachability_continue_A02_t01
co19/LanguageFeatures/nnbd/flow-analysis/reachability_continue_A02_t02
co19/LanguageFeatures/nnbd/flow-analysis/reachability_continue_A03_t03

An example of break in the test:

main() {
  late int i;
  for (;;) {
    break;
    i = 42; // Variable is initialized in a dead code. This leaves it definitely unassigned
  }
  i; // It is an error to read a local late variable when it is definitely unassigned.
//^
// [analyzer] unspecified
// [cfe] unspecified
}

An example of continue in the test:

main() {
  late int i;
  int j = 0;
  while (j++ < 3) {
    continue;
    i = 42; // Variable is initialized in a dead code. This leaves it definitely unassigned
  }
  i; // It is an error to read a local late variable when it is definitely unassigned.
//^
// [analyzer] unspecified
// [cfe] unspecified
}

Metadata

Metadata

Assignees

Labels

NNBDIssues related to NNBD Releasedart-model-analyzer-specIssues with the analyzer's implementation of the language speclegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions