ef6295df67
Change-Id: I58fa6ea3c34dec65e9cc754aeeffbe779314bd3c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286958 Commit-Queue: Kallen Tu <kallentu@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
28 lines
592 B
Dart
28 lines
592 B
Dart
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// Derived from co19/Language/Mixins/Mixin_Application/implicit_constructor_t02
|
|
|
|
class A {
|
|
bool v1;
|
|
num v2;
|
|
A(bool this.v1, num this.v2);
|
|
}
|
|
|
|
mixin M1 {
|
|
num v2 = -1;
|
|
}
|
|
|
|
class C = A with M1;
|
|
|
|
main() {
|
|
C c = new C(true, 2);
|
|
expect(true, c.v1);
|
|
expect(-1, c.v2);
|
|
}
|
|
|
|
expect(expected, actual) {
|
|
if (expected != actual) throw 'Expected $expected, actual $actual';
|
|
}
|