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

Unified Diff: pkg/intl/lib/extract_messages.dart

Issue 152543002: Fix analyzer redness. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | « no previous file | sdk/lib/_internal/dartdoc/lib/src/export_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/extract_messages.dart
diff --git a/pkg/intl/lib/extract_messages.dart b/pkg/intl/lib/extract_messages.dart
index 1495b6ae40fe4b7a90c1b932d52dc1644372eac7..aca18da7743a47983c310ab3225772d428dd495a 100644
--- a/pkg/intl/lib/extract_messages.dart
+++ b/pkg/intl/lib/extract_messages.dart
@@ -112,7 +112,8 @@ class MessageFindingVisitor extends GeneralizingASTVisitor {
const validNames = const ["message", "plural", "gender", "select"];
if (!validNames.contains(node.methodName.name)) return false;
if (!(node.target is SimpleIdentifier)) return false;
- return node.target.token.toString() == "Intl";
+ SimpleIdentifier target = node.target;
+ return target.token.toString() == "Intl";
}
Message _expectedInstance(String type) {
@@ -404,7 +405,8 @@ class PluralAndGenderVisitor extends SimpleASTVisitor {
return false;
}
if (!(node.target is SimpleIdentifier)) return false;
- return node.target.token.toString() == "Intl";
+ SimpleIdentifier target = node.target;
+ return target.token.toString() == "Intl";
}
/**
@@ -440,7 +442,7 @@ class PluralAndGenderVisitor extends SimpleASTVisitor {
} on IntlMessageExtractionException catch (e) {
message = null;
var err = new StringBuffer()
- ..writeAll(["Error ", $e, "\nProcessing <", node, ">"])
+ ..writeAll(["Error ", e, "\nProcessing <", node, ">"])
..write(_reportErrorLocation(node));
print(err);
warnings.add(err);
« no previous file with comments | « no previous file | sdk/lib/_internal/dartdoc/lib/src/export_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698