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

Unified Diff: pkg/dev_compiler/test/codegen_expected/closure.js

Issue 2781443003: Fix #28120, strong mode allows field overrides (Closed)
Patch Set: fix Created 3 years, 9 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
Index: pkg/dev_compiler/test/codegen_expected/closure.js
diff --git a/pkg/dev_compiler/test/codegen_expected/closure.js b/pkg/dev_compiler/test/codegen_expected/closure.js
index 24d77ba45ca7b56b3525ea18b10d8e9ac715af82..754e9fd3b58d3cd4e9d6d5632278ab24b31724a7 100644
--- a/pkg/dev_compiler/test/codegen_expected/closure.js
+++ b/pkg/dev_compiler/test/codegen_expected/closure.js
@@ -29,11 +29,35 @@ closure.Foo$ = dart.generic(T => {
static some_static_constant: string;
static some_static_final: string;
static some_static_var: string;
+ get i() {
+ return this[i$];
+ }
+ set i(value) {
+ super.i = value;
+ }
+ get b() {
+ return this[b];
+ }
+ set b(value) {
+ this[b] = value;
+ }
+ get s() {
+ return this[s];
+ }
+ set s(value) {
+ this[s] = value;
+ }
+ get v() {
+ return this[v$];
+ }
+ set v(value) {
+ this[v$] = value;
+ }
new(i: number, v: T) {
- this.i = i;
- this.v = v;
- this.b = null;
- this.s = null;
+ this[i$] = i;
+ this[v$] = v;
+ this[b] = null;
+ this[s] = null;
}
static build() {
return new (FooOfT())(1, null);
@@ -63,6 +87,10 @@ closure.Foo$ = dart.generic(T => {
static set staticProp(value: string) {}
}
dart.addTypeTests(Foo);
+ const i$ = Symbol("Foo.i");
+ const b = Symbol("Foo.b");
+ const s = Symbol("Foo.s");
+ const v$ = Symbol("Foo.v");
dart.setSignature(Foo, {
fields: () => ({
i: core.int,
« no previous file with comments | « pkg/dev_compiler/test/codegen_expected/BenchmarkBase.js ('k') | pkg/dev_compiler/test/codegen_expected/sunflower/sunflower.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698