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

Unified Diff: frog/member.dart

Issue 8481023: cleanup errors and fix a couple field negative tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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
« no previous file with comments | « frog/library.dart ('k') | frog/type.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/member.dart
diff --git a/frog/member.dart b/frog/member.dart
index a01df90b4c633e2b1e0db1d2698c3a3d51850ac3..5865e200c06dcc7923cce43b33196b42944391f5 100644
--- a/frog/member.dart
+++ b/frog/member.dart
@@ -295,6 +295,10 @@ class FieldMember extends Member {
definition.type.span);
}
+ if (isStatic && isFinal && value == null) {
+ world.error('static final field is missing initializer', span);
+ }
+
library._addMember(this);
}
@@ -1242,6 +1246,9 @@ class MemberSet {
void add(Member member) => members.add(member);
+ // TODO(jimhug): Always false, or is this needed?
+ bool get isStatic() => members.length == 1 && members[0].isStatic;
+
bool canInvoke(MethodGenerator context, Arguments args) =>
members.some((m) => m.canInvoke(context, args));
« no previous file with comments | « frog/library.dart ('k') | frog/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698