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

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

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/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 class A extends core.Object { 4 class A extends core.Object {
5 A() { 5 A() {
6 this.x = 42; 6 dart.initField(A, this, 'x', 42);
7 } 7 }
8 } 8 }
9 let B$ = dart.generic(function(T) { 9 let B$ = dart.generic(function(T) {
10 class B extends core.Object { 10 class B extends core.Object {
11 B() { 11 B() {
12 this.x = null; 12 dart.initField(B, this, 'x', null);
13 this.y = null; 13 dart.initField(B, this, 'y', null);
14 this.z = null; 14 dart.initField(B, this, 'z', null);
15 } 15 }
16 } 16 }
17 return B; 17 return B;
18 }); 18 });
19 let B = B$(); 19 let B = B$();
20 // Function foo: (A) → int 20 // Function foo: (A) → int
21 function foo(a) { 21 function foo(a) {
22 core.print(a.x); 22 core.print(a.x);
23 return a.x; 23 return a.x;
24 } 24 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Exports: 62 // Exports:
63 exports.A = A; 63 exports.A = A;
64 exports.B$ = B$; 64 exports.B$ = B$;
65 exports.B = B; 65 exports.B = B;
66 exports.foo = foo; 66 exports.foo = foo;
67 exports.bar = bar; 67 exports.bar = bar;
68 exports.baz = baz; 68 exports.baz = baz;
69 exports.compute = compute; 69 exports.compute = compute;
70 exports.main = main; 70 exports.main = main;
71 })(fieldtest || (fieldtest = {})); 71 })(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