Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: tests/language/mixin_black_listed_test.dart

Issue 25844002: Check mixin of black-listed types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Check mixin of black-listed types.
6
7 import 'package:expect/expect.dart';
karlklose 2013/10/03 07:50:01 Tests for num are missing.
Johnni Winther 2013/10/03 08:00:26 It is in 05.
8
9 class C {}
10 class D {}
11
12 class C1 extends Object
13 with String /// 01: compile-time error
14 {}
15
16 class D1 extends Object with C
17 , Null /// 02: compile-time error
18 {}
19
20 class E1 extends Object with
21 int, /// 03: compile-time error
22 C {}
23
24 class F1 extends Object with C
25 , double /// 04: compile-time error
26 , D {}
27
28 typedef C2 = Object with num; /// 05: compile-time error
29
30 typedef D2 = Object with C
31 , bool /// 06: compile-time error
32 ;
33
34 typedef E2 = Object with
35 String, /// 07: compile-time error
36 C;
37
38 typedef F2 = Object with C,
39 dynamic, /// 08: compile-time error
40 D;
41
42
43 main() {
44 Expect.isNotNull(new C1());
45 Expect.isNotNull(new D1());
46 Expect.isNotNull(new E1());
47 Expect.isNotNull(new F1());
48 Expect.isNotNull(new C2()); /// 05: continued
49 Expect.isNotNull(new D2());
50 Expect.isNotNull(new E2());
51 Expect.isNotNull(new F2());
52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698