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

Side by Side Diff: test/codegen/expect/fields.js

Issue 1090313002: 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/constructors.js ('k') | test/codegen/expect/fields.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 var fields;
2 (function(exports) {
3 'use strict';
4 // Function init: (dynamic) → dynamic
5 function init(x) {
6 core.print(x);
7 return x;
8 }
9 let x = Symbol('x');
10 class Base extends core.Object {
11 Base() {
12 this[x] = init('Base.x');
13 }
14 get x() {
15 return this[x];
16 }
17 set x(value) {
18 this[x] = value;
19 }
20 }
21 let x$ = Symbol('x');
22 class Mixin1 extends core.Object {
23 Mixin1() {
24 this[x$] = init('Mixin1.x');
25 }
26 get x() {
27 return this[x$];
28 }
29 set x(value) {
30 this[x$] = value;
31 }
32 }
33 let x$0 = Symbol('x');
34 class Mixin2 extends core.Object {
35 Mixin2() {
36 this[x$0] = init('Mixin2.x');
37 }
38 get x() {
39 return this[x$0];
40 }
41 set x(value) {
42 this[x$0] = value;
43 }
44 }
45 let x$1 = Symbol('x');
46 class Derived extends dart.mixin(Base, Mixin1, Mixin2) {
47 Derived() {
48 this[x$1] = init('Derived.x');
49 super.Base();
50 }
51 get x() {
52 return this[x$1];
53 }
54 set x(value) {
55 this[x$1] = value;
56 }
57 }
58 class _Base extends core.Object {
59 _Base() {
60 this.x = init('_Base.x');
61 }
62 }
63 let _x = Symbol('_x');
64 let _x$ = Symbol('_x');
65 class _Mixin1 extends core.Object {
66 _Mixin1() {
67 this[_x] = init('_Mixin1.x');
68 }
69 get [_x$]() {
70 return this[_x];
71 }
72 set [_x$](value) {
73 this[_x] = value;
74 }
75 }
76 let _x$0 = Symbol('_x');
77 class _Mixin2 extends core.Object {
78 _Mixin2() {
79 this[_x$0] = init('_Mixin2.x');
80 }
81 get [_x$]() {
82 return this[_x$0];
83 }
84 set [_x$](value) {
85 this[_x$0] = value;
86 }
87 }
88 let _x$1 = Symbol('_x');
89 class _Derived extends dart.mixin(_Base, _Mixin1, _Mixin2) {
90 _Derived() {
91 this[_x$1] = init('_Derived.x');
92 super._Base();
93 }
94 get [_x$]() {
95 return this[_x$1];
96 }
97 set [_x$](value) {
98 this[_x$1] = value;
99 }
100 }
101 // Function main: () → dynamic
102 function main() {
103 core.print('Creating Derived');
104 core.print('Derived.x == ' + dart.notNull(new Derived().x));
105 core.print('Creating _Derived');
106 core.print('_Derived.x == ' + dart.notNull(new _Derived()[_x$]));
107 }
108 // Exports:
109 exports.init = init;
110 exports.Base = Base;
111 exports.Mixin1 = Mixin1;
112 exports.Mixin2 = Mixin2;
113 exports.Derived = Derived;
114 exports.main = main;
115 })(fields || (fields = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/constructors.js ('k') | test/codegen/expect/fields.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698