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

Unified Diff: lib/src/compiler/code_generator.dart

Issue 2071593003: Allow constant static fields to overwrite defaults (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler/code_generator.dart
diff --git a/lib/src/compiler/code_generator.dart b/lib/src/compiler/code_generator.dart
index ec33413eba317246a9ee699c4d550d9154f0f54c..3f3722f4ff7f1b5315472b82952cbde6ee5eb5a0 100644
--- a/lib/src/compiler/code_generator.dart
+++ b/lib/src/compiler/code_generator.dart
@@ -3408,7 +3408,7 @@ class CodeGenerator extends GeneralizingAstVisitor
!JS.invalidStaticFieldName(fieldName) &&
Jennifer Messerly 2016/06/15 20:28:53 So this check above was supposed to handle the inv
stanm 2016/06/15 20:51:05 Done.
!staticFieldOverrides.contains(element)) {
return annotate(
- js.statement('#.# = #;', [
+ js.statement('Object.defineProperty(#, #, { value: # });', [
stanm 2016/06/15 20:51:40 Reverted in second patch set.
_emitTopLevelName(classElem),
_emitMemberName(fieldName, isStatic: true),
jsInit
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698