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

Side by Side Diff: test/codegen/expect/fieldtest.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/fields.txt ('k') | test/codegen/expect/methods.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var fieldtest; 1 var fieldtest;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 let x = Symbol('x');
4 class A extends core.Object { 5 class A extends core.Object {
5 A() { 6 A() {
6 this.x = 42; 7 this[x] = 42;
8 }
9 get x() {
10 return this[x];
11 }
12 set x(value) {
13 this[x] = value;
7 } 14 }
8 } 15 }
16 let x$ = Symbol('x');
17 let y = Symbol('y');
18 let z = Symbol('z');
9 let B$ = dart.generic(function(T) { 19 let B$ = dart.generic(function(T) {
10 class B extends core.Object { 20 class B extends core.Object {
11 B() { 21 B() {
12 this.x = null; 22 this[x$] = null;
13 this.y = null; 23 this[y] = null;
14 this.z = null; 24 this[z] = null;
25 }
26 get x() {
27 return this[x$];
28 }
29 set x(value) {
30 this[x$] = value;
31 }
32 get y() {
33 return this[y];
34 }
35 set y(value) {
36 this[y] = value;
37 }
38 get z() {
39 return this[z];
40 }
41 set z(value) {
42 this[z] = value;
15 } 43 }
16 } 44 }
17 return B; 45 return B;
18 }); 46 });
19 let B = B$(); 47 let B = B$();
20 // Function foo: (A) → int 48 // Function foo: (A) → int
21 function foo(a) { 49 function foo(a) {
22 core.print(a.x); 50 core.print(a.x);
23 return a.x; 51 return a.x;
24 } 52 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Exports: 90 // Exports:
63 exports.A = A; 91 exports.A = A;
64 exports.B$ = B$; 92 exports.B$ = B$;
65 exports.B = B; 93 exports.B = B;
66 exports.foo = foo; 94 exports.foo = foo;
67 exports.bar = bar; 95 exports.bar = bar;
68 exports.baz = baz; 96 exports.baz = baz;
69 exports.compute = compute; 97 exports.compute = compute;
70 exports.main = main; 98 exports.main = main;
71 })(fieldtest || (fieldtest = {})); 99 })(fieldtest || (fieldtest = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/fields.txt ('k') | test/codegen/expect/methods.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698