dart-sdk/tests/language/mixin_declaration/mixin_declaration_invalid_usage_test.dart
Robert Nystrom 2658f495f2 Migrate language_2/mixin_declaration to NNBD.
Change-Id: Ic30aef0302e1d2a2812eeb81b414a69e7591f625
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149622
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-10 01:09:45 +00:00

19 lines
565 B
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.
mixin Mixin // cannot `extend` anything.
extends M //# 01: compile-time error
extends Object //# 02: compile-time error
{}
// You cannot extend a mixin.
class Class // cannot extend a mixin
extends Mixin //# 03: compile-time error
{}
void main() {
// Cannot instantiate a mixin.
new Mixin(); //# 04: compile-time error
new Class();
}