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

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

Issue 2797443007: fix #29182, generate top level const fields lazily (Closed)
Patch Set: fix Created 3 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
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 754e9fd3b58d3cd4e9d6d5632278ab24b31724a7..87b7cc3b48701d59c791080f698e487e3f5a3edb 100644
--- a/pkg/dev_compiler/test/codegen_expected/closure.js
+++ b/pkg/dev_compiler/test/codegen_expected/closure.js
@@ -115,12 +115,18 @@ closure.Foo$ = dart.generic(T => {
return Foo;
});
closure.Foo = Foo();
-/** @final {string} */
-closure.Foo.some_static_constant = "abc";
-/** @final {string} */
-closure.Foo.some_static_final = "abc";
-/** @type {string} */
-closure.Foo.some_static_var = "abc";
+dart.defineLazy(closure.Foo, {
+ get some_static_constant() {
+ return "abc";
+ },
+ get some_static_final() {
+ return "abc";
+ },
+ get some_static_var() {
+ return "abc";
+ },
+ set some_static_var(_) {}
+});
closure.Bar = class Bar extends core.Object {};
closure.Baz = class Baz extends dart.mixin(closure.Foo$(core.int), closure.Bar) {
new(i: number) {
@@ -137,12 +143,16 @@ dart.defineLazy(closure, {
return;
}, VoidToNull());
},
- set closure(_) {}
+ set closure(_) {},
+ get some_top_level_constant() {
+ return "abc";
+ },
+ get some_top_level_final() {
+ return "abc";
+ },
+ get some_top_level_var() {
+ return "abc";
+ },
+ set some_top_level_var(_) {}
});
-/** @final {string} */
-closure.some_top_level_constant = "abc";
-/** @final {string} */
-closure.some_top_level_final = "abc";
-/** @type {string} */
-closure.some_top_level_var = "abc";
dart.trackLibraries("closure", {"closure.dart": closure}, null);

Powered by Google App Engine
This is Rietveld 408576698