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

Side by Side Diff: test/codegen/expect/constructors.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/cascade.js ('k') | test/codegen/expect/fields.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 constructors; 1 var constructors;
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 class B extends core.Object { 5 class B extends core.Object {
6 B() { 6 B() {
7 } 7 }
8 } 8 }
9 class C extends core.Object { 9 class C extends core.Object {
10 named() { 10 named() {
11 } 11 }
12 } 12 }
13 dart.defineNamedConstructor(C, 'named'); 13 dart.defineNamedConstructor(C, 'named');
14 class C2 extends C { 14 class C2 extends C {
15 named() { 15 named() {
16 super.named(); 16 super.named();
17 } 17 }
18 } 18 }
19 dart.defineNamedConstructor(C2, 'named'); 19 dart.defineNamedConstructor(C2, 'named');
20 class D extends core.Object { 20 class D extends core.Object {
21 D() { 21 D() {
22 } 22 }
23 named() { 23 named() {
24 } 24 }
25 } 25 }
26 dart.defineNamedConstructor(D, 'named'); 26 dart.defineNamedConstructor(D, 'named');
27 class E extends core.Object { 27 class E extends core.Object {
28 E(name) { 28 E(name) {
29 this.name = name; 29 dart.initField(E, this, 'name', name);
30 } 30 }
31 } 31 }
32 class F extends E { 32 class F extends E {
33 F(name) { 33 F(name) {
34 super.E(name); 34 super.E(name);
35 } 35 }
36 } 36 }
37 class G extends core.Object { 37 class G extends core.Object {
38 G(p1) { 38 G(p1) {
39 if (p1 === void 0) 39 if (p1 === void 0)
40 p1 = null; 40 p1 = null;
41 } 41 }
42 } 42 }
43 class H extends core.Object { 43 class H extends core.Object {
44 H(opts) { 44 H(opts) {
45 let p1 = opts && 'p1' in opts ? opts.p1 : null; 45 let p1 = opts && 'p1' in opts ? opts.p1 : null;
46 } 46 }
47 } 47 }
48 class I extends core.Object { 48 class I extends core.Object {
49 I() { 49 I() {
50 this.name = 'default'; 50 dart.initField(I, this, 'name', 'default');
51 } 51 }
52 named(name) { 52 named(name) {
53 this.name = name; 53 dart.initField(I, this, 'name', name);
54 } 54 }
55 } 55 }
56 dart.defineNamedConstructor(I, 'named'); 56 dart.defineNamedConstructor(I, 'named');
57 class J extends core.Object { 57 class J extends core.Object {
58 J() { 58 J() {
59 this.initialized = true; 59 dart.initField(J, this, 'initialized', true);
60 this.nonInitialized = null; 60 dart.initField(J, this, 'nonInitialized', null);
61 } 61 }
62 } 62 }
63 class K extends core.Object { 63 class K extends core.Object {
64 K() { 64 K() {
65 this.s = 'a'; 65 dart.initField(K, this, 's', 'a');
66 } 66 }
67 withS(s) { 67 withS(s) {
68 this.s = s; 68 dart.initField(K, this, 's', s);
69 } 69 }
70 } 70 }
71 dart.defineNamedConstructor(K, 'withS'); 71 dart.defineNamedConstructor(K, 'withS');
72 class L extends core.Object { 72 class L extends core.Object {
73 L(foo) { 73 L(foo) {
74 this.foo = foo; 74 dart.initField(L, this, 'foo', foo);
75 } 75 }
76 } 76 }
77 class M extends L { 77 class M extends L {
78 named(x) { 78 named(x) {
79 super.L(dart.notNull(x) + 42); 79 super.L(dart.notNull(x) + 42);
80 } 80 }
81 } 81 }
82 dart.defineNamedConstructor(M, 'named'); 82 dart.defineNamedConstructor(M, 'named');
83 class N extends M { 83 class N extends M {
84 named(y) { 84 named(y) {
(...skipping 25 matching lines...) Expand all
110 exports.G = G; 110 exports.G = G;
111 exports.H = H; 111 exports.H = H;
112 exports.I = I; 112 exports.I = I;
113 exports.J = J; 113 exports.J = J;
114 exports.K = K; 114 exports.K = K;
115 exports.L = L; 115 exports.L = L;
116 exports.M = M; 116 exports.M = M;
117 exports.N = N; 117 exports.N = N;
118 exports.P = P; 118 exports.P = P;
119 })(constructors || (constructors = {})); 119 })(constructors || (constructors = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/cascade.js ('k') | test/codegen/expect/fields.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698