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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/codegen/expect/cascade.js ('k') | test/codegen/expect/fields.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/constructors.js
diff --git a/test/codegen/expect/constructors.js b/test/codegen/expect/constructors.js
index 4fb06b7c78bdcf4b32eb76d6eb90753fddf2edc8..3982e1b75f481e8f33be36d9cd857c5b6a05f6b1 100644
--- a/test/codegen/expect/constructors.js
+++ b/test/codegen/expect/constructors.js
@@ -24,9 +24,16 @@ var constructors;
}
}
dart.defineNamedConstructor(D, 'named');
+ let name$ = Symbol('name');
class E extends core.Object {
+ get name() {
+ return this[name$];
+ }
+ set name(value) {
+ this[name$] = value;
+ }
E(name) {
- this.name = name;
+ this[name$] = name;
}
}
class F extends E {
@@ -45,33 +52,68 @@ var constructors;
let p1 = opts && 'p1' in opts ? opts.p1 : null;
}
}
+ let name$0 = Symbol('name');
class I extends core.Object {
+ get name() {
+ return this[name$0];
+ }
+ set name(value) {
+ this[name$0] = value;
+ }
I() {
- this.name = 'default';
+ this[name$0] = 'default';
}
named(name) {
- this.name = name;
+ this[name$0] = name;
}
}
dart.defineNamedConstructor(I, 'named');
+ let nonInitialized = Symbol('nonInitialized');
+ let initialized = Symbol('initialized');
class J extends core.Object {
+ get nonInitialized() {
+ return this[nonInitialized];
+ }
+ set nonInitialized(value) {
+ this[nonInitialized] = value;
+ }
+ get initialized() {
+ return this[initialized];
+ }
+ set initialized(value) {
+ this[initialized] = value;
+ }
J() {
- this.initialized = true;
- this.nonInitialized = null;
+ this[initialized] = true;
+ this[nonInitialized] = null;
}
}
+ let s$ = Symbol('s');
class K extends core.Object {
+ get s() {
+ return this[s$];
+ }
+ set s(value) {
+ this[s$] = value;
+ }
K() {
- this.s = 'a';
+ this[s$] = 'a';
}
withS(s) {
- this.s = s;
+ this[s$] = s;
}
}
dart.defineNamedConstructor(K, 'withS');
+ let foo$ = Symbol('foo');
class L extends core.Object {
+ get foo() {
+ return this[foo$];
+ }
+ set foo(value) {
+ this[foo$] = value;
+ }
L(foo) {
- this.foo = foo;
+ this[foo$] = foo;
}
}
class M extends L {
« 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