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

Side by Side Diff: test/codegen/fields.dart

Issue 1093143004: fixes #52, fields shadowing getters/setters or other fields (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « test/codegen/expect/temps.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4
5 library fields;
6
7 init(x) {
8 print(x);
9 return x;
10 }
11
12 class Base {
13 var x = init('Base.x');
14 }
15 class Mixin1 {
16 var x = init('Mixin1.x');
17 }
18 class Mixin2 {
19 var x = init('Mixin2.x');
20 }
21 class Derived extends Base with Mixin1, Mixin2 {
22 var x = init('Derived.x');
23 }
24
25 // Private within the same library also needs this treatment.
26 class _Base {
27 var x = init('_Base.x');
28 }
29 class _Mixin1 {
30 var _x = init('_Mixin1.x');
31 }
32 class _Mixin2 {
33 var _x = init('_Mixin2.x');
34 }
35 class _Derived extends _Base with _Mixin1, _Mixin2 {
36 var _x = init('_Derived.x');
37 }
38
39
40 main() {
41 print('Creating Derived');
42 print('Derived.x == ' + new Derived().x);
43 print('Creating _Derived');
44 print('_Derived.x == ' + new _Derived()._x);
45 }
OLDNEW
« no previous file with comments | « test/codegen/expect/temps.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698