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

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

Issue 1008583002: Fix hints (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/ast.dart ('k') | pkg/analyzer/lib/src/generated/element_resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/constant.dart
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index 635431a342dcb8dfc8030e2c0fd0fb9f1709862c..ae9ce66d7c1f82f4db5bf1c4ef6239265ae0db8c 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -433,8 +433,8 @@ class ConstantValueComputer {
referenceGraph.addNode(declaration);
declaration.initializer.accept(referenceFinder);
});
- constructorDeclarationMap.forEach(
- (ConstructorElement element, ConstructorDeclaration declaration) {
+ constructorDeclarationMap.forEach((ConstructorElement element,
+ ConstructorDeclaration declaration) {
ReferenceFinder referenceFinder = new ReferenceFinder(declaration,
referenceGraph, _variableDeclarationMap, constructorDeclarationMap);
referenceGraph.addNode(declaration);
@@ -862,8 +862,7 @@ class ConstantValueComputer {
// The parameter is an optional positional parameter for which no value
// was provided, so use the default value.
beforeGetParameterDefault(baseParameter);
- EvaluationResultImpl evaluationResult =
- (baseParameter as ParameterElementImpl).evaluationResult;
+ EvaluationResultImpl evaluationResult = baseParameter.evaluationResult;
if (evaluationResult == null) {
// No default was provided, so the default value is null.
argumentValue = constantVisitor.null2;
@@ -4934,10 +4933,9 @@ class ReferenceFinder extends RecursiveAstVisitor<Object> {
element = (element as PropertyAccessorElement).variable;
}
if (element is VariableElement) {
- VariableElement variable = element as VariableElement;
- if (variable.isConst) {
+ if (element.isConst) {
VariableDeclaration variableDeclaration =
- _variableDeclarationMap[variable];
+ _variableDeclarationMap[element];
// The declaration will be null when the variable is not defined in the
// compilation units that were used to produce the
// variableDeclarationMap. In such cases, the variable should already
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/element_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698