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

Unified Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10879003: Const variables handled as final (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index f3d37ec5e0467ee81f3b57eaafd24c0b0318e886..f55b4af71026a5ed615ff9dde1d96a3751a3c98c 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -1137,6 +1137,12 @@ class Modifiers extends Node {
bool isFactory() => (flags & FLAG_FACTORY) != 0;
bool isExternal() => (flags & FLAG_EXTERNAL) != 0;
+ /**
+ * Returns [:true:] iff the modifiers contain either [:final:] or [:const:],
ahe 2012/08/22 14:07:46 The phrase "iff" is not standard vocabulary, so it
Johnni Winther 2012/08/22 14:23:20 The documentation was added to explain the semanti
+ * that is, that the declaration is either explicitly or implicitly final.
+ */
+ bool isFinalOrConst() => isFinal() || isConst();
+
String toString() {
LinkBuilder<String> builder = new LinkBuilder<String>();
if (isStatic()) builder.addLast('static');

Powered by Google App Engine
This is Rietveld 408576698