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

Unified Diff: frog/leg/warnings.dart

Issue 9211005: Support static/global field initializations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and add start of error-handling. Created 8 years, 11 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: frog/leg/warnings.dart
diff --git a/frog/leg/warnings.dart b/frog/leg/warnings.dart
index e54f8f939ab1315c0609e4c7e31566b2facdad24..ccf8d90022aa7f743c1efcad0a4775d74af50436 100644
--- a/frog/leg/warnings.dart
+++ b/frog/leg/warnings.dart
@@ -65,6 +65,9 @@ class MessageKind {
static final INVALID_FOR_IN = const MessageKind(
'Invalid for-in variable declaration.');
+ static final NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
+ '#{1} cannot be used as compile-time constant.');
+
toString() => template;
}
@@ -115,3 +118,11 @@ class ResolutionWarning {
: message = new Message(kind, arguments);
String toString() => message.toString();
}
+
+class CompileTimeConstantError {
ngeoffray 2012/01/16 15:22:35 I would remove this. This looks like a ResolutionE
floitsch 2012/01/18 12:56:19 as discussed: keeping it, since there are CTC erro
+ final Message message;
+ CompileTimeConstantError.message(this.message);
+ CompileTimeConstantError(MessageKind kind, List<Type> arguments)
+ : message = new Message(kind, arguments);
+ String toString() => message.toString();
+}

Powered by Google App Engine
This is Rietveld 408576698