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

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

Issue 12018014: Start allowing mixin application extensions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Extend test cases. Created 7 years, 11 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
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class S { 5 class S {
6 var foo = "S-foo"; 6 var foo = "S-foo";
7 } 7 }
8 8
9 class M1 { 9 class M1 {
10 final bar = "M1-bar"; 10 final bar = "M1-bar";
11 } 11 }
12 12
13 class M2 { 13 class M2 {
14 var baz = "M2-baz"; 14 var baz = "M2-baz";
15 } 15 }
16 16
17 typedef C = S with M1; 17 class C extends S with M1 { }
18 typedef D = S with M1, M2; 18 class D extends S with M1, M2 { }
19 typedef E = S with M2, M1; 19 class E extends S with M2, M1 { }
20 20
21 class F extends E { 21 class F extends E {
22 var fez = "F-fez"; 22 var fez = "F-fez";
23 } 23 }
24 24
25 main() { 25 main() {
26 var c = new C(); 26 var c = new C();
27 var d = new D(); 27 var d = new D();
28 var e = new E(); 28 var e = new E();
29 var f = new F(); 29 var f = new F();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 Expect.throws(() => c.fez = 0, (error) => error is NoSuchMethodError); 109 Expect.throws(() => c.fez = 0, (error) => error is NoSuchMethodError);
110 Expect.throws(() => d.fez = 0, (error) => error is NoSuchMethodError); 110 Expect.throws(() => d.fez = 0, (error) => error is NoSuchMethodError);
111 Expect.throws(() => e.fez = 0, (error) => error is NoSuchMethodError); 111 Expect.throws(() => e.fez = 0, (error) => error is NoSuchMethodError);
112 112
113 f.fez = "F-fez-f"; 113 f.fez = "F-fez-f";
114 Expect.throws(() => c.fez, (error) => error is NoSuchMethodError); 114 Expect.throws(() => c.fez, (error) => error is NoSuchMethodError);
115 Expect.throws(() => d.fez, (error) => error is NoSuchMethodError); 115 Expect.throws(() => d.fez, (error) => error is NoSuchMethodError);
116 Expect.throws(() => e.fez, (error) => error is NoSuchMethodError); 116 Expect.throws(() => e.fez, (error) => error is NoSuchMethodError);
117 Expect.equals("F-fez-f", f.fez); 117 Expect.equals("F-fez-f", f.fez);
118 } 118 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/tree/nodes.dart ('k') | tests/language/mixin_extends_is_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698