Skip to content

Analyzer not type checking elements in for in loops. #48706

Closed
@stereotype441

Description

@stereotype441

The following program is accepted by the analyzer but rejected by the front end:

f(List<String> strings) {
  for (int i in strings) { // BUG
    print(i);
  }
}

main() {
  f([]);
}

I'm pretty sure the front end behavior is correct and the analyzer is missing a type check here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4legacy-area-analyzerUse area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions