mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 22:21:18 +00:00
b83359599e
Change-Id: I3eccd65b982628fa9775a94b1ac61b48d8732f80 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286540 Reviewed-by: Bob Nystrom <rnystrom@google.com> Auto-Submit: Jake Macdonald <jakemac@google.com> Commit-Queue: Jake Macdonald <jakemac@google.com>
59 lines
1.1 KiB
Dart
59 lines
1.1 KiB
Dart
// Copyright (c) 2018, 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.
|
|
|
|
// TODO(https://github.com/dart-lang/sdk/issues/51557): Decide if the mixins
|
|
// being applied in this test should be "mixin", "mixin class" or the test
|
|
// should be left at 2.19.
|
|
// @dart=2.19
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
class A {}
|
|
|
|
class B {}
|
|
|
|
class I {}
|
|
|
|
class J {}
|
|
|
|
mixin M1 on A, B implements I, J {}
|
|
|
|
class M2 implements A, B, I, J {}
|
|
|
|
class M3 implements A, B, I, J {}
|
|
|
|
class M4 implements A, B, I, J {}
|
|
|
|
class M5 implements A, B, I, J {}
|
|
|
|
class C implements A, B {}
|
|
|
|
class D1 = C with M1;
|
|
|
|
class D2 = C with M2;
|
|
|
|
class D3 = C with M3;
|
|
|
|
class D4 extends C with M4 {}
|
|
|
|
class D5 extends C with M5 {}
|
|
|
|
class E5 extends D5 {}
|
|
|
|
@pragma('dart2js:noInline')
|
|
test(o) {}
|
|
|
|
main() {
|
|
test(new M3());
|
|
test(new D2());
|
|
test(new D4());
|
|
test(new E5());
|
|
Expect.subtype<D1, M1>();
|
|
Expect.subtype<D2, M2>();
|
|
Expect.subtype<D3, M3>();
|
|
Expect.subtype<D4, M4>();
|
|
Expect.subtype<D5, M5>();
|
|
Expect.subtype<E5, M5>();
|
|
}
|