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

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: Don't call function that does not exist. 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 ab5b76ea3fde903577fcfb110ccb9e091c4ddd97..e1729b64912f5fca42ca2356d3dad95587321060 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,6 +46,14 @@ 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 DUPLICATE_INITIALIZER = const MessageKind(
+ 'field #{1} is initialized more than once (before at #{2})');
ngeoffray 2011/12/21 11:52:11 before at -> already initialized at ?
ahe 2011/12/21 12:01:58 I'm not sure I understand this. Won't it just say:
karlklose 2011/12/21 16:33:46 Removed 'before at' in favor of a second warning.
karlklose 2011/12/21 16:33:46 No, it would print the initializer node. I removed
+ 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