Skip to content

[dart2js] Numeric record type tests give different results at compile time vs. runtime #52619

Closed
@fishythefish

Description

@fishythefish
@pragma('dart2js:never-inline')
bool test<T>(dynamic x) => x is T;

void main() {
  print(1 is double);
  print(test<double>(1));

  print((1,) is (double,));
  print(test<(double,)>((1,)));
}

This prints

true
true
false
true

cc @rakudrama @biggs0125

Metadata

Metadata

Assignees

Labels

area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-dart2js

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions