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

Side by Side Diff: test/codegen/expect/methods.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/fieldtest.js ('k') | test/codegen/expect/names.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 methods; 1 var methods;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 let _c = Symbol('_c'); 4 let _c = Symbol('_c');
5 class A extends core.Object { 5 class A extends core.Object {
6 A() { 6 A() {
7 this[_c] = 3; 7 dart.initField(A, this, _c, 3);
8 } 8 }
9 x() { 9 x() {
10 return 42; 10 return 42;
11 } 11 }
12 y(a) { 12 y(a) {
13 return a; 13 return a;
14 } 14 }
15 z(b) { 15 z(b) {
16 if (b === void 0) 16 if (b === void 0)
17 b = null; 17 b = null;
(...skipping 23 matching lines...) Expand all
41 this[_c] = c; 41 this[_c] = c;
42 } 42 }
43 } 43 }
44 class Bar extends core.Object { 44 class Bar extends core.Object {
45 call(x) { 45 call(x) {
46 return core.print(`hello from ${x}`); 46 return core.print(`hello from ${x}`);
47 } 47 }
48 } 48 }
49 class Foo extends core.Object { 49 class Foo extends core.Object {
50 Foo() { 50 Foo() {
51 this.bar = new Bar(); 51 dart.initField(Foo, this, 'bar', new Bar());
52 } 52 }
53 } 53 }
54 // Function test: () → dynamic 54 // Function test: () → dynamic
55 function test() { 55 function test() {
56 let f = new Foo(); 56 let f = new Foo();
57 dart.dsend(f, 'bar', "Bar's call method!"); 57 dart.dsend(f, 'bar', "Bar's call method!");
58 } 58 }
59 // Exports: 59 // Exports:
60 exports.A = A; 60 exports.A = A;
61 exports.Bar = Bar; 61 exports.Bar = Bar;
62 exports.Foo = Foo; 62 exports.Foo = Foo;
63 exports.test = test; 63 exports.test = test;
64 })(methods || (methods = {})); 64 })(methods || (methods = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/fieldtest.js ('k') | test/codegen/expect/names.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698