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

Unified Diff: pkg/compiler/lib/src/resolution/signatures.dart

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 years, 6 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
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].
« no previous file with comments | « pkg/compiler/lib/src/resolution/send_structure.dart ('k') | pkg/compiler/lib/src/resolution/tree_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698