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

Side by Side Diff: tests/language_strong/super_field_2_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) 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import "package:meta/meta.dart" show virtual;
6 7
7 class A { 8 class A {
8 var foo; 9 @virtual var foo;
9 A(this.foo); 10 A(this.foo);
10 11
11 B_Sfoo() => 'A.B_Sfoo()'; 12 B_Sfoo() => 'A.B_Sfoo()';
12 } 13 }
13 14
14 class B extends A { 15 class B extends A {
15 B(x) : super(x); 16 B(x) : super(x);
16 17
17 B_Sfoo() => super.foo; 18 B_Sfoo() => super.foo;
18 BC_Sfoo() => super.foo; 19 BC_Sfoo() => super.foo;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 Expect.equals('Ba', inscrutable(b).BC_Sfoo()); 80 Expect.equals('Ba', inscrutable(b).BC_Sfoo());
80 Expect.equals('Ca', inscrutable(c).BC_Sfoo()); 81 Expect.equals('Ca', inscrutable(c).BC_Sfoo());
81 Expect.equals('Da', inscrutable(d).BC_Sfoo()); 82 Expect.equals('Da', inscrutable(d).BC_Sfoo());
82 83
83 Expect.equals('Ba', inscrutable(b).BCD_Sfoo()); 84 Expect.equals('Ba', inscrutable(b).BCD_Sfoo());
84 Expect.equals('Ca', inscrutable(c).BCD_Sfoo()); 85 Expect.equals('Ca', inscrutable(c).BCD_Sfoo());
85 Expect.equals('Dc', inscrutable(d).BCD_Sfoo()); 86 Expect.equals('Dc', inscrutable(d).BCD_Sfoo());
86 87
87 88
88 } 89 }
OLDNEW
« no previous file with comments | « tests/language_strong/setter_override2_test.dart ('k') | tests/language_strong/super_field_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698