Index: pkg/compiler/lib/src/resolution/signatures.dart |
diff --git a/pkg/compiler/lib/src/resolution/signatures.dart b/pkg/compiler/lib/src/resolution/signatures.dart |
index 33dbfd8a1a312c5471201ba18f4c627f1625f993..ddc35286d569f93a52b8b1c6be0e8646b99958ba 100644 |
--- a/pkg/compiler/lib/src/resolution/signatures.dart |
+++ b/pkg/compiler/lib/src/resolution/signatures.dart |
@@ -35,7 +35,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> { |
final Scope scope; |
final MessageKind defaultValuesError; |
final bool createRealParameters; |
- List<Element> optionalParameters = const <Element>[]; |
+ List<FormalElement> optionalParameters = const <FormalElement>[]; |
int optionalParameterCount = 0; |
bool isOptionalParameter = false; |
bool optionalParametersAreNamed = false; |
@@ -65,7 +65,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> { |
} |
optionalParametersAreNamed = (identical(value, '{')); |
isOptionalParameter = true; |
- LinkBuilder<Element> elements = analyzeNodes(node.nodes); |
+ LinkBuilder<FormalElement> elements = analyzeNodes(node.nodes); |
optionalParameterCount = elements.length; |
optionalParameters = elements.toList(); |
} |
@@ -252,7 +252,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> { |
} |
/// A [SendSet] node is an optional parameter with a default value. |
- Element visitSendSet(SendSet node) { |
+ FormalElementX visitSendSet(SendSet node) { |
FormalElementX element; |
if (node.receiver != null) { |
element = createFieldParameter(node, node.arguments.first); |
@@ -267,7 +267,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> { |
return element; |
} |
- Element visitFunctionExpression(FunctionExpression node) { |
+ FormalElementX visitFunctionExpression(FunctionExpression node) { |
// This is a function typed parameter. |
Modifiers modifiers = currentDefinitions.modifiers; |
if (modifiers.isFinal) { |
@@ -282,8 +282,8 @@ class SignatureResolver extends MappingVisitor<FormalElementX> { |
return createParameter(node.name, null); |
} |
- LinkBuilder<Element> analyzeNodes(Link<Node> link) { |
- LinkBuilder<Element> elements = new LinkBuilder<Element>(); |
+ LinkBuilder<FormalElement> analyzeNodes(Link<Node> link) { |
+ LinkBuilder<FormalElement> elements = new LinkBuilder<FormalElement>(); |
for (; !link.isEmpty; link = link.tail) { |
Element element = link.head.accept(this); |
if (element != null) { |
@@ -356,7 +356,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> { |
resolution, element, scope, registry, |
defaultValuesError: defaultValuesError, |
createRealParameters: createRealParameters); |
- List<Element> parameters = const <Element>[]; |
+ List<FormalElement> parameters = const <FormalElement>[]; |
int requiredParameterCount = 0; |
if (formalParameters == null) { |
if (!element.isGetter) { |
@@ -380,7 +380,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> { |
formalParameters, MessageKind.EXTRA_FORMALS); |
} |
} |
- LinkBuilder<Element> parametersBuilder = |
+ LinkBuilder<FormalElement> parametersBuilder = |
visitor.analyzeNodes(formalParameters.nodes); |
requiredParameterCount = parametersBuilder.length; |
parameters = parametersBuilder.toList(); |
@@ -438,7 +438,7 @@ class SignatureResolver extends MappingVisitor<FormalElementX> { |
const <ResolutionDartType>[]; |
List<String> namedParameters = const <String>[]; |
List<ResolutionDartType> namedParameterTypes = const <ResolutionDartType>[]; |
- List<Element> orderedOptionalParameters = |
+ List<FormalElement> orderedOptionalParameters = |
visitor.optionalParameters.toList(); |
if (visitor.optionalParametersAreNamed) { |
// TODO(karlklose); replace when [visitor.optionalParameters] is a [List]. |