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

Unified Diff: lib/src/protobuf/builder_info.dart

Issue 814213003: Allow constants as field initial values as well as creation thunks (Closed) Base URL: https://github.com/dart-lang/dart-protobuf@master
Patch Set: Created 6 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
« no previous file with comments | « lib/protobuf.dart ('k') | lib/src/protobuf/extension.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/protobuf/builder_info.dart
diff --git a/lib/src/protobuf/builder_info.dart b/lib/src/protobuf/builder_info.dart
index 188f186cc6c234dbabce25b9740df8ae95727e20..ee3acfafc83548298e538bfa02f62b6e3bef65a7 100644
--- a/lib/src/protobuf/builder_info.dart
+++ b/lib/src/protobuf/builder_info.dart
@@ -17,26 +17,26 @@ class BuilderInfo {
BuilderInfo(this.messageName);
void add(int tagNumber, String name, int fieldType,
- MakeDefaultFunc makeDefault,
+ dynamic defaultOrMaker,
CreateBuilderFunc subBuilder,
ValueOfFunc valueOf) {
fieldInfo[tagNumber] = byName[name] = new FieldInfo(
- name, tagNumber, fieldType, makeDefault, subBuilder, valueOf);
+ name, tagNumber, fieldType, defaultOrMaker, subBuilder, valueOf);
}
void a(int tagNumber, String name, int fieldType,
- [MakeDefaultFunc makeDefault,
- CreateBuilderFunc subBuilder,
- ValueOfFunc valueOf]) {
+ [dynamic defaultOrMaker,
+ CreateBuilderFunc subBuilder,
+ ValueOfFunc valueOf]) {
add(tagNumber, name, fieldType,
- makeDefault, subBuilder, valueOf);
+ defaultOrMaker, subBuilder, valueOf);
}
// Enum.
void e(int tagNumber, String name, int fieldType,
- MakeDefaultFunc makeDefault, ValueOfFunc valueOf) {
+ dynamic defaultOrMaker, ValueOfFunc valueOf) {
add(tagNumber, name, fieldType,
- makeDefault, null, valueOf);
+ defaultOrMaker, null, valueOf);
}
// Repeated message.
« no previous file with comments | « lib/protobuf.dart ('k') | lib/src/protobuf/extension.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698