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

Unified Diff: frog/leg/warnings.dart

Issue 8974014: Resolve initializers in constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address 2nd round of comments. Created 9 years 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 5a40b2b9b0e56aba1a04e458d215495b795be179..99553a7782c09e265a337bdf39ef49945f32f510 100644
--- a/frog/leg/warnings.dart
+++ b/frog/leg/warnings.dart
@@ -26,6 +26,8 @@ class MessageKind {
'no method named #{2} in class #{1}');
static final MEMBER_NOT_STATIC = const MessageKind(
'#{1}.#{2} is not static');
+ static final NOT_STATIC = const MessageKind(
+ '#{1} is not static');
static final UNREACHABLE_CODE = const MessageKind(
'unreachable code');
@@ -44,8 +46,18 @@ class MessageKind {
'#{1} is not a type');
static final CANNOT_FIND_CONSTRUCTOR = const MessageKind(
'cannot find constructor #{1}');
+ static final INVALID_RECEIVER_IN_INITIALIZER = const MessageKind(
+ 'field initializer expected');
static final NO_THIS_IN_STATIC = const MessageKind(
'\'this\' is only available in instance methods');
+ static final DUPLICATE_INITIALIZER = const MessageKind(
+ 'field #{1} is initialized more than once');
+ static final ALREADY_INITIALIZED = const MessageKind(
+ '#{1} was already initialized here');
+ static final INIT_STATIC_FIELD = const MessageKind(
+ 'cannot initialize static field #{1}');
+ static final NOT_A_FIELD = const MessageKind(
+ '#{1} is not a field');
toString() => template;
}

Powered by Google App Engine
This is Rietveld 408576698