| Index: tests/language/mixin_black_listed_test.dart
|
| diff --git a/tests/language/mixin_black_listed_test.dart b/tests/language/mixin_black_listed_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..809274be81fd6e793517516accad97ff03067560
|
| --- /dev/null
|
| +++ b/tests/language/mixin_black_listed_test.dart
|
| @@ -0,0 +1,52 @@
|
| +// Copyright (c) 2013, 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.
|
| +
|
| +// Check mixin of black-listed types.
|
| +
|
| +import 'package:expect/expect.dart';
|
| +
|
| +class C {}
|
| +class D {}
|
| +
|
| +class C1 extends Object
|
| +with String /// 01: compile-time error
|
| +{}
|
| +
|
| +class D1 extends Object with C
|
| +, Null /// 02: compile-time error
|
| +{}
|
| +
|
| +class E1 extends Object with
|
| +int, /// 03: compile-time error
|
| +C {}
|
| +
|
| +class F1 extends Object with C
|
| +, double /// 04: compile-time error
|
| +, D {}
|
| +
|
| +typedef C2 = Object with num; /// 05: compile-time error
|
| +
|
| +typedef D2 = Object with C
|
| +, bool /// 06: compile-time error
|
| +;
|
| +
|
| +typedef E2 = Object with
|
| +String, /// 07: compile-time error
|
| +C;
|
| +
|
| +typedef F2 = Object with C,
|
| +dynamic, /// 08: compile-time error
|
| +D;
|
| +
|
| +
|
| +main() {
|
| + Expect.isNotNull(new C1());
|
| + Expect.isNotNull(new D1());
|
| + Expect.isNotNull(new E1());
|
| + Expect.isNotNull(new F1());
|
| + Expect.isNotNull(new C2()); /// 05: continued
|
| + Expect.isNotNull(new D2());
|
| + Expect.isNotNull(new E2());
|
| + Expect.isNotNull(new F2());
|
| +}
|
|
|