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

Side by Side Diff: dart/tests/compiler/dart2js_native/native_class_inheritance4_frog_test.dart

Issue 10831332: Support new getter syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Additional Dart code may be 'placed on' hidden native classes. With 5 // Additional Dart code may be 'placed on' hidden native classes. With
6 // inheritance, the superclass method must not be reached by a call on the 6 // inheritance, the superclass method must not be reached by a call on the
7 // subclass. 7 // subclass.
8 8
9 class A native "*A" { 9 class A native "*A" {
10 var _field; 10 var _field;
11 11
12 int get X() => _field; 12 int get X => _field;
13 void set X(int x) { _field = x; } 13 void set X(int x) { _field = x; }
14 14
15 int method(int z) => _field + z; 15 int method(int z) => _field + z;
16 } 16 }
17 17
18 class B extends A native "*B" { 18 class B extends A native "*B" {
19 var _field2; 19 var _field2;
20 20
21 int get X() => _field2; 21 int get X => _field2;
22 void set X(int x) { _field2 = x; } 22 void set X(int x) { _field2 = x; }
23 23
24 int method(int z) => _field2 + z; 24 int method(int z) => _field2 + z;
25 } 25 }
26 26
27 A makeA() native { return new A(); } 27 A makeA() native { return new A(); }
28 B makeB() native { return new B(); } 28 B makeB() native { return new B(); }
29 29
30 void setup() native @""" 30 void setup() native @"""
31 function inherits(child, parent) { 31 function inherits(child, parent) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 137
138 main() { 138 main() {
139 testBasicA_dynamic(); 139 testBasicA_dynamic();
140 testBasicA_typed(); 140 testBasicA_typed();
141 testBasicB_dynamic(); 141 testBasicB_dynamic();
142 testBasicB_typed(); 142 testBasicB_typed();
143 testAB_dynamic(); 143 testAB_dynamic();
144 testAB_typed(); 144 testAB_typed();
145 } 145 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698