mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
38667e5667
Supercedes the following (reverted/abandoned) CLs: * https://dart-review.googlesource.com/c/sdk/+/162383 * https://dart-review.googlesource.com/c/sdk/+/165149 * https://dart-review.googlesource.com/c/sdk/+/165782 Fixes https://github.com/flutter/flutter/issues/66859 and https://github.com/flutter/flutter/issues/64011 Thanks to Siggi for this approach! Change-Id: I8e496fdb938e18252ec8a0cf7232c99ca8c27080 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166127 Commit-Queue: Mark Zhou <markzipan@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>
38 lines
943 B
Dart
38 lines
943 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.
|
|
|
|
// Verifies that mixin supertypes are properly maintained even if marked as
|
|
// deferred (e.g., in a circular hierarchy).
|
|
// Regression test for: https://github.com/flutter/flutter/issues/66859
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
mixin X {}
|
|
mixin Y {}
|
|
mixin Z {}
|
|
|
|
class A extends B<C> with X {}
|
|
|
|
class C extends A with Z {}
|
|
|
|
class B<T> extends Object with Y {}
|
|
|
|
main() {
|
|
var a = A();
|
|
var b = B();
|
|
var c = C();
|
|
Expect.isTrue(a is A);
|
|
Expect.isTrue(a is B<C>);
|
|
Expect.isTrue(a is X);
|
|
Expect.isTrue(a is Y);
|
|
Expect.isTrue(c is C);
|
|
Expect.isTrue(c is A);
|
|
Expect.isTrue(c is B<C>);
|
|
Expect.isTrue(c is X);
|
|
Expect.isTrue(c is Y);
|
|
Expect.isTrue(c is Z);
|
|
Expect.isTrue(b is B);
|
|
Expect.isTrue(b is Y);
|
|
}
|