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

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

Issue 27300003: Change "typedef" to "class" in core library and related tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update some dart2js tests and unparser. 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
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 // Test that [:this:] in a class A used as a mixin in class D knows it can be an 5 // Test that [:this:] in a class A used as a mixin in class D knows it can be an
6 // instance of D. 6 // instance of D.
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 9
10 class A { 10 class A {
11 foo() => bar(); // Implicit use of [:this:] 11 foo() => bar(); // Implicit use of [:this:]
12 bar() => 42; 12 bar() => 42;
13 } 13 }
14 14
15 class B {} 15 class B {}
16 16
17 typedef C = B with A; 17 class C = B with A;
18 18
19 class D extends C { 19 class D extends C {
20 bar() => 54; 20 bar() => 54;
21 } 21 }
22 22
23 class E extends A { 23 class E extends A {
24 bar() => 68; 24 bar() => 68;
25 } 25 }
26 26
27 main() { 27 main() {
28 Expect.equals(54, new D().foo()); 28 Expect.equals(54, new D().foo());
29 Expect.equals(68, new E().foo()); 29 Expect.equals(68, new E().foo());
30 } 30 }
OLDNEW
« no previous file with comments | « tests/language/mixin_override_regression_test.dart ('k') | tests/language/mixin_type_parameter1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698