Skip to content

Different tear-offs are wrongly identical in CFE #47462

Closed
@sgrekhov

Description

@sgrekhov

Consider the following code

typedef MyList<T extends num> = List<T>;

main() {
  var v1 = MyList<num>.filled;
  var v2 = MyList<num>.filled;
  var v3 = (MyList.filled)<num>;

  Expect.identical(v1, v2);
  print(identical(v1, v3));  // true
}

v1 and v3 should not be identical, see #47267

Tested on Dart SDK version: 2.15.0-208.0.dev (dev) (Mon Oct 11 22:12:57 2021 -0700) on "windows_x64"

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onlegacy-area-front-endLegacy: Use area-dart-model instead.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions