Skip to content

Should eliminating implicit casts include casts during iteration. #264

@leafpetersen

Description

@leafpetersen

Currently in Dart (or soon in the case of the spread), the following is a legal program:

main() {
  var a = <Object>[1, 2, 3];
  for(int x in a) {
    print(x);
  }
  <int>[...a];
}

There are implied casts on each element of the iteration, and on each element addition from the spread.

If we eliminate implicit casts, should we include these as well?

Metadata

Metadata

Assignees

No one assigned

    Labels

    nnbdNNBD related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions