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

Side by Side Diff: tests/language_strong/field_test.dart

Issue 2571363002: fixes #27385, implement virtual fields in DDC (Closed)
Patch Set: format Created 4 years 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
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 // Dart test program for testing setting/getting of instance fields. 4 // Dart test program for testing setting/getting of instance fields.
5 5
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import "package:meta/meta.dart" show virtual;
7 8
8 class First { 9 class First {
9 First() {} 10 First() {}
10 var a; 11 @virtual var a;
11 var b; 12 @virtual var b;
12 13
13 addFields() { 14 addFields() {
14 return a + b; 15 return a + b;
15 } 16 }
16 17
17 setValues() { 18 setValues() {
18 a = 24; 19 a = 24;
19 b = 10; 20 b = 10;
20 return a + b; 21 return a + b;
21 } 22 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 static testMain() { 65 static testMain() {
65 // FieldTest.one(); 66 // FieldTest.one();
66 FieldTest.two(); 67 FieldTest.two();
67 } 68 }
68 } 69 }
69 70
70 71
71 main() { 72 main() {
72 FieldTest.testMain(); 73 FieldTest.testMain();
73 } 74 }
OLDNEW
« no previous file with comments | « tests/language_strong/closure_with_super_field_test.dart ('k') | tests/language_strong/getter_override2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698