Skip to content

[ddc] Wrong behaviour for a class C = Object with M; mixin usage. #50489

@kallentu

Description

@kallentu
mixin M {
  int x = 0;
}

abstract class C = Object with M;

class CMixin with C {}

void main() {
  var cMixin = CMixin();
  var value = cMixin.x;
  print('We expect 0 here: $value');
}

In Dart2JS, we get the output of 0, while in DDC we get null for this example. This happens specifically with this mixin syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.dart2js-ddc-discrepancyWhen dev and production compilations have different semanticstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)web-dev-compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions