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

Unified Diff: pkg/serialization/lib/src/serialization_rule.dart

Issue 14793016: pkg/serialization types cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: const is better, right? Created 7 years, 7 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
« no previous file with comments | « pkg/serialization/lib/src/reader_writer.dart ('k') | pkg/serialization/test/serialization_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/serialization/lib/src/serialization_rule.dart
diff --git a/pkg/serialization/lib/src/serialization_rule.dart b/pkg/serialization/lib/src/serialization_rule.dart
index d7560b7e274792e97b6c9ad613a272130aaa3044..1a592a7eb8411351d6c402349a772e2393d8f383 100644
--- a/pkg/serialization/lib/src/serialization_rule.dart
+++ b/pkg/serialization/lib/src/serialization_rule.dart
@@ -27,10 +27,10 @@ abstract class SerializationRule {
* Rules belong uniquely to a particular Serialization instance, and can
* be identified within it by number.
*/
- void set number(x) {
- if (_number != null && _number != x) throw
+ void set number(int value) {
+ if (_number != null && _number != value) throw
new SerializationException("Rule numbers cannot be changed, once set");
- _number = x;
+ _number = value;
}
/**
@@ -91,7 +91,7 @@ abstract class SerializationRule {
* to see how bad it is.
*/
// TODO(alanknight): Reconsider whether this should be handled differently.
- get mustBePrimary => false;
+ bool get mustBePrimary => false;
/**
* Create the new object corresponding to [state] using the rules
« no previous file with comments | « pkg/serialization/lib/src/reader_writer.dart ('k') | pkg/serialization/test/serialization_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698