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

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

Issue 11415105: Eliminate explicit abstract from class members in tests (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Regression test for http://dartbug.com/6259. This test used to fail 5 // Regression test for http://dartbug.com/6259. This test used to fail
6 // on dart2js because class A does not know [A.document] is a target for 6 // on dart2js because class A does not know [A.document] is a target for
7 // the call [:obj.document:] in the [main] method. Therefore, dart2js 7 // the call [:obj.document:] in the [main] method. Therefore, dart2js
8 // would not compile [A.document]. 8 // would not compile [A.document].
9 9
10 class A { 10 class A {
11 get document => 42; 11 get document => 42;
12 } 12 }
13 13
14 abstract class B { 14 abstract class B {
15 abstract get document; 15 get document; // Abstract.
16 } 16 }
17 17
18 class C extends A implements B { 18 class C extends A implements B {
19 } 19 }
20 20
21 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); 21 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
22 22
23 void main() { 23 void main() {
24 var tab = [new Object(), new C()]; 24 var tab = [new Object(), new C()];
25 var obj = tab[inscrutable(1)]; 25 var obj = tab[inscrutable(1)];
26 int res = 0; 26 int res = 0;
27 if (obj is B) res = obj.document; 27 if (obj is B) res = obj.document;
28 Expect.equals(42, res); 28 Expect.equals(42, res);
29 } 29 }
OLDNEW
« no previous file with comments | « tests/language/property_field_override_test.dart ('k') | tests/standalone/io/testing_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698