Skip to content

Analyzer not catching variable declared and used in for-in loop #4090

@sethladd

Description

@sethladd

Code:

List foo(x) {
  return [1,2,3];
}

main() {
  
  for (var y in foo(y)) {
    print(y);
  }
  
}

I would expect some warning when y is used in foo(y)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions