Index: tools/testing/dart/vendored_pkg/args/args.dart |
diff --git a/tools/testing/dart/vendored_pkg/args/args.dart b/tools/testing/dart/vendored_pkg/args/args.dart |
index 6d4b6de6c04c9f365d452177c4859e1571c1c468..af9db87e4243b7c0c1d17832b132ee7e3df43eec 100644 |
--- a/tools/testing/dart/vendored_pkg/args/args.dart |
+++ b/tools/testing/dart/vendored_pkg/args/args.dart |
@@ -277,15 +277,23 @@ class ArgParser { |
List<String> allowed, |
Map<String, String> allowedHelp, |
String defaultsTo, |
- void callback(value), |
+ void callback(dynamic value), |
bool allowMultiple: false}) { |
_addOption(name, abbr, help, allowed, allowedHelp, defaultsTo, callback, |
isFlag: false, allowMultiple: allowMultiple); |
} |
- void _addOption(String name, String abbr, String help, List<String> allowed, |
- Map<String, String> allowedHelp, defaultsTo, void callback(value), |
- {bool isFlag, bool negatable: false, bool allowMultiple: false}) { |
+ void _addOption( |
+ String name, |
+ String abbr, |
+ String help, |
+ List<String> allowed, |
+ Map<String, String> allowedHelp, |
+ dynamic defaultsTo, |
+ void callback(dynamic value), |
+ {bool isFlag, |
+ bool negatable: false, |
+ bool allowMultiple: false}) { |
// Make sure the name isn't in use. |
if (options.containsKey(name)) { |
throw new ArgumentError('Duplicate option "$name".'); |
@@ -327,7 +335,7 @@ class ArgParser { |
* Get the default value for an option. Useful after parsing to test |
* if the user specified something other than the default. |
*/ |
- getDefault(String option) { |
+ dynamic getDefault(String option) { |
if (!options.containsKey(option)) { |
throw new ArgumentError('No option named $option'); |
} |
@@ -351,7 +359,7 @@ class Option { |
final String name; |
final String abbreviation; |
final List allowed; |
- final defaultValue; |
+ final dynamic defaultValue; |
final Function callback; |
final String help; |
final Map<String, String> allowedHelp; |
@@ -370,7 +378,7 @@ class Option { |
* command line arguments. |
*/ |
class ArgResults { |
- final Map _options; |
+ final Map<String, dynamic> _options; |
/** |
* If these are the results for parsing a command's options, this will be |
@@ -395,7 +403,7 @@ class ArgResults { |
ArgResults(this._options, this.name, this.command, this.rest); |
/** Gets the parsed command-line option named [name]. */ |
- operator [](String name) { |
+ dynamic operator [](String name) { |
if (!_options.containsKey(name)) { |
throw new ArgumentError('Could not find an option named "$name".'); |
} |