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

Unified Diff: lib/compiler/implementation/elements/elements.dart

Issue 10855174: Lazy implementation of final variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tests. Created 8 years, 4 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: lib/compiler/implementation/elements/elements.dart
diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
index 2344018ca6a1811693d957a920efa8c961bbed8d..13fbe6e0a7f50d212971be64b5c380c62baf472d 100644
--- a/lib/compiler/implementation/elements/elements.dart
+++ b/lib/compiler/implementation/elements/elements.dart
@@ -159,7 +159,8 @@ class Element implements Hashable {
bool isTopLevel() => enclosingElement.isCompilationUnit();
bool isAssignable() {
- if (modifiers != null && modifiers.isFinal()) return false;
+ if (modifiers != null
+ && (modifiers.isFinal() || modifiers.isConst())) return false;
kasperl 2012/08/16 14:41:37 Maybe introduce a modifiers.isFinalOrConst()?
floitsch 2012/08/16 22:52:33 Done.
if (isFunction() || isGenerativeConstructor()) return false;
return true;
}

Powered by Google App Engine
This is Rietveld 408576698