mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 15:01:29 +00:00
d9326f4ab3
Bug: Change-Id: Icda59de9bfad2e9b2683f019fb9c6fc54c12547c Reviewed-on: https://dart-review.googlesource.com/7587 Reviewed-by: Bob Nystrom <rnystrom@google.com>
37 lines
851 B
Dart
37 lines
851 B
Dart
// Copyright (c) 2016, 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.
|
|
// SharedOptions=--supermixin
|
|
|
|
// Validate the following test from section 12 ("Mixins") of the spec:
|
|
//
|
|
// "Let M_A be a mixin derived from a class M with direct superclass
|
|
// S_static.
|
|
//
|
|
// Let A be an application of M_A. It is a static warning if the
|
|
// superclass of A is not a subtype of S_static."
|
|
|
|
class B {}
|
|
|
|
class C {}
|
|
|
|
class D {}
|
|
|
|
class E extends B with C implements D {}
|
|
|
|
class F extends E {}
|
|
|
|
class A extends E with M {}
|
|
|
|
class M
|
|
extends B //# 01: ok
|
|
extends C //# 02: static type warning
|
|
extends D //# 03: ok
|
|
extends E //# 04: ok
|
|
extends F //# 05: static type warning
|
|
{}
|
|
|
|
main() {
|
|
new A();
|
|
}
|