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

Side by Side Diff: test/codegen/expect/constructors.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/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 let name$ = Symbol('name');
27 class E extends core.Object { 28 class E extends core.Object {
29 get name() {
30 return this[name$];
31 }
32 set name(value) {
33 this[name$] = value;
34 }
28 E(name) { 35 E(name) {
29 this.name = name; 36 this[name$] = name;
30 } 37 }
31 } 38 }
32 class F extends E { 39 class F extends E {
33 F(name) { 40 F(name) {
34 super.E(name); 41 super.E(name);
35 } 42 }
36 } 43 }
37 class G extends core.Object { 44 class G extends core.Object {
38 G(p1) { 45 G(p1) {
39 if (p1 === void 0) 46 if (p1 === void 0)
40 p1 = null; 47 p1 = null;
41 } 48 }
42 } 49 }
43 class H extends core.Object { 50 class H extends core.Object {
44 H(opts) { 51 H(opts) {
45 let p1 = opts && 'p1' in opts ? opts.p1 : null; 52 let p1 = opts && 'p1' in opts ? opts.p1 : null;
46 } 53 }
47 } 54 }
55 let name$0 = Symbol('name');
48 class I extends core.Object { 56 class I extends core.Object {
57 get name() {
58 return this[name$0];
59 }
60 set name(value) {
61 this[name$0] = value;
62 }
49 I() { 63 I() {
50 this.name = 'default'; 64 this[name$0] = 'default';
51 } 65 }
52 named(name) { 66 named(name) {
53 this.name = name; 67 this[name$0] = name;
54 } 68 }
55 } 69 }
56 dart.defineNamedConstructor(I, 'named'); 70 dart.defineNamedConstructor(I, 'named');
71 let nonInitialized = Symbol('nonInitialized');
72 let initialized = Symbol('initialized');
57 class J extends core.Object { 73 class J extends core.Object {
74 get nonInitialized() {
75 return this[nonInitialized];
76 }
77 set nonInitialized(value) {
78 this[nonInitialized] = value;
79 }
80 get initialized() {
81 return this[initialized];
82 }
83 set initialized(value) {
84 this[initialized] = value;
85 }
58 J() { 86 J() {
59 this.initialized = true; 87 this[initialized] = true;
60 this.nonInitialized = null; 88 this[nonInitialized] = null;
61 } 89 }
62 } 90 }
91 let s$ = Symbol('s');
63 class K extends core.Object { 92 class K extends core.Object {
93 get s() {
94 return this[s$];
95 }
96 set s(value) {
97 this[s$] = value;
98 }
64 K() { 99 K() {
65 this.s = 'a'; 100 this[s$] = 'a';
66 } 101 }
67 withS(s) { 102 withS(s) {
68 this.s = s; 103 this[s$] = s;
69 } 104 }
70 } 105 }
71 dart.defineNamedConstructor(K, 'withS'); 106 dart.defineNamedConstructor(K, 'withS');
107 let foo$ = Symbol('foo');
72 class L extends core.Object { 108 class L extends core.Object {
109 get foo() {
110 return this[foo$];
111 }
112 set foo(value) {
113 this[foo$] = value;
114 }
73 L(foo) { 115 L(foo) {
74 this.foo = foo; 116 this[foo$] = foo;
75 } 117 }
76 } 118 }
77 class M extends L { 119 class M extends L {
78 named(x) { 120 named(x) {
79 super.L(dart.notNull(x) + 42); 121 super.L(dart.notNull(x) + 42);
80 } 122 }
81 } 123 }
82 dart.defineNamedConstructor(M, 'named'); 124 dart.defineNamedConstructor(M, 'named');
83 class N extends M { 125 class N extends M {
84 named(y) { 126 named(y) {
(...skipping 25 matching lines...) Expand all
110 exports.G = G; 152 exports.G = G;
111 exports.H = H; 153 exports.H = H;
112 exports.I = I; 154 exports.I = I;
113 exports.J = J; 155 exports.J = J;
114 exports.K = K; 156 exports.K = K;
115 exports.L = L; 157 exports.L = L;
116 exports.M = M; 158 exports.M = M;
117 exports.N = N; 159 exports.N = N;
118 exports.P = P; 160 exports.P = P;
119 })(constructors || (constructors = {})); 161 })(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