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

Unified Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 1918923003: Remove unnecessary casts and general code clean-up (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: clean-up Created 4 years, 8 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/analyzer/lib/src/generated/error_verifier.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index 490b676b6b6c61e7acce6677eeacf5e95d133e62..d0620ca7d847c6516e299222e2973123be3ff5f1 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -1686,9 +1686,9 @@ class PoorMansIncrementalResolver {
setElementDocumentationComment(parentElement, parent);
} else if (parentElement == null && parent is FieldDeclaration) {
for (VariableDeclaration field in parent.fields.variables) {
- if (field.element is ElementImpl) {
- setElementDocumentationComment(
- field.element as ElementImpl, parent);
+ Element fieldElement = field.element;
+ if (fieldElement is ElementImpl) {
+ setElementDocumentationComment(fieldElement, parent);
}
}
}
@@ -1866,7 +1866,7 @@ class PoorMansIncrementalResolver {
static Token _getBeginTokenNotComment(AstNode node) {
Token oldBeginToken = node.beginToken;
if (oldBeginToken is CommentToken) {
- oldBeginToken = (oldBeginToken as CommentToken).parent;
+ return oldBeginToken.parent;
}
return oldBeginToken;
}
« no previous file with comments | « pkg/analyzer/lib/src/generated/error_verifier.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698