Skip to content

DDC not initialing mixin fields properly from named constructor #29544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vsmenon opened this issue May 3, 2017 · 2 comments
Closed

DDC not initialing mixin fields properly from named constructor #29544

vsmenon opened this issue May 3, 2017 · 2 comments
Assignees
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures web-dev-compiler

Comments

@vsmenon
Copy link
Member

vsmenon commented May 3, 2017

This was hit internally. This is the simplified repro:

import 'package:test/test.dart';

abstract class A {
  bool _done = true;
}

abstract class B {
  String name;

  B.protected();
}

class C extends B with A {
  C(): super.protected() {
    name = 'C';
  }
}

void main() {
  test('mixin works', () {
    C c = new C();
    expect(c._done, true); // DDC test fails because [c._done] reads [null]
  });
}
@vsmenon vsmenon added web-dev-compiler P1 A high priority bug; for example, a single project is unusable or has many test failures labels May 3, 2017
@vsmenon
Copy link
Member Author

vsmenon commented May 3, 2017

@jmesserly - can you take a look?

@jmesserly jmesserly self-assigned this May 3, 2017
@jmesserly
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures web-dev-compiler
Projects
None yet
Development

No branches or pull requests

2 participants