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

Unified Diff: test/codegen/expect/sunflower/sunflower.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/sunflower/dom.js ('k') | test/codegen/fields.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/sunflower/sunflower.js
diff --git a/test/codegen/expect/sunflower/sunflower.js b/test/codegen/expect/sunflower/sunflower.js
index ec7f75ccde32fc1c5167476ed1fef91e27ae5798..632890c16d35fc872ace761cbe2dd47867791c77 100644
--- a/test/codegen/expect/sunflower/sunflower.js
+++ b/test/codegen/expect/sunflower/sunflower.js
@@ -45,16 +45,35 @@ var sunflower;
}
exports.notes.textContent = `${exports.seeds} seeds`;
}
+ let x$ = Symbol('x');
+ let y$ = Symbol('y');
+ let radius$ = Symbol('radius');
+ let color = Symbol('color');
class Circle extends core.Object {
+ get x() {
+ return this[x$];
+ }
+ get y() {
+ return this[y$];
+ }
+ get radius() {
+ return this[radius$];
+ }
Circle(x, y, radius) {
- this.x = x;
- this.y = y;
- this.radius = radius;
+ this[x$] = x;
+ this[y$] = y;
+ this[radius$] = radius;
}
}
class CirclePainter extends core.Object {
CirclePainter() {
- this.color = ORANGE;
+ this[color] = ORANGE;
+ }
+ get color() {
+ return this[color];
+ }
+ set color(value) {
+ this[color] = value;
}
draw() {
exports.context.beginPath();
« no previous file with comments | « test/codegen/expect/sunflower/dom.js ('k') | test/codegen/fields.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698