| 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
|
|
|