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

Unified Diff: test/codegen/expect/fieldtest.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/fields.txt ('k') | test/codegen/expect/methods.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/fieldtest.js
diff --git a/test/codegen/expect/fieldtest.js b/test/codegen/expect/fieldtest.js
index 9354cf6742d7c7fd365d7343aeb536e991928128..bb3dc98499201330041072af24f5965f45ac645a 100644
--- a/test/codegen/expect/fieldtest.js
+++ b/test/codegen/expect/fieldtest.js
@@ -1,17 +1,45 @@
var fieldtest;
(function(exports) {
'use strict';
+ let x = Symbol('x');
class A extends core.Object {
A() {
- this.x = 42;
+ this[x] = 42;
+ }
+ get x() {
+ return this[x];
+ }
+ set x(value) {
+ this[x] = value;
}
}
+ let x$ = Symbol('x');
+ let y = Symbol('y');
+ let z = Symbol('z');
let B$ = dart.generic(function(T) {
class B extends core.Object {
B() {
- this.x = null;
- this.y = null;
- this.z = null;
+ this[x$] = null;
+ this[y] = null;
+ this[z] = null;
+ }
+ get x() {
+ return this[x$];
+ }
+ set x(value) {
+ this[x$] = value;
+ }
+ get y() {
+ return this[y];
+ }
+ set y(value) {
+ this[y] = value;
+ }
+ get z() {
+ return this[z];
+ }
+ set z(value) {
+ this[z] = value;
}
}
return B;
« no previous file with comments | « test/codegen/expect/fields.txt ('k') | test/codegen/expect/methods.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698