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

Unified Diff: tools/testing/dart/vendored_pkg/args/src/parser.dart

Issue 2903703002: Tighten types in test.dart even more. (Closed)
Patch Set: Play nicer with strong mode. Created 3 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 | « tools/testing/dart/vendored_pkg/args/args.dart ('k') | tools/testing/dart/vendored_pkg/args/src/usage.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/vendored_pkg/args/src/parser.dart
diff --git a/tools/testing/dart/vendored_pkg/args/src/parser.dart b/tools/testing/dart/vendored_pkg/args/src/parser.dart
index afdcf58e818b9c9ab747ae1835a48b0fda3a0c56..c2cc0497404e761a1db1eb6dcd7ef75b9a2afde6 100644
--- a/tools/testing/dart/vendored_pkg/args/src/parser.dart
+++ b/tools/testing/dart/vendored_pkg/args/src/parser.dart
@@ -35,7 +35,7 @@ class Parser {
final List<String> args;
/** The accumulated parsed options. */
- final Map results = {};
+ final Map<String, dynamic> results = {};
Parser(this.commandName, this.grammar, this.args, [this.parent]);
@@ -44,7 +44,7 @@ class Parser {
/** Parses the arguments. This can only be called once. */
ArgResults parse() {
- var commandResults = null;
+ ArgResults commandResults;
// Initialize flags to their defaults.
grammar.options.forEach((name, option) {
@@ -260,12 +260,12 @@ class Parser {
* Called during parsing to validate the arguments. Throws a
* [FormatException] if [condition] is `false`.
*/
- validate(bool condition, String message) {
+ void validate(bool condition, String message) {
if (!condition) throw new FormatException(message);
}
/** Validates and stores [value] as the value for [option]. */
- setOption(Map results, Option option, value) {
+ void setOption(Map results, Option option, dynamic value) {
// See if it's one of the allowed values.
if (option.allowed != null) {
validate(option.allowed.any((allow) => allow == value),
« no previous file with comments | « tools/testing/dart/vendored_pkg/args/args.dart ('k') | tools/testing/dart/vendored_pkg/args/src/usage.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698