Skip to content

inconsistencies in constants representations with CFE #32511

Closed
@sigmundch

Description

@sigmundch

Dart2js with the new frontend produces a different representation of constants that:

  • use "!="
  • use redirecting const factory constructors.

Examples:

  • 1 != 2 is represented as !(1 == 2) with the CFE

  • with the following code, const B<int>() is represented as const A<B<int>>

class A<T> implements B {}
class B<S> {
  const factory B() = A<B<S>>;
}

Some of these cases are seen in tests/compiler/dart2js/model/constant_expression_test.dart

/cc @johnniwinther

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onweb-dart2js

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions