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

Side by Side Diff: pkg/compiler/lib/src/resolution/signatures.dart

Issue 1173403002: dart2js: Fix hints in code base. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updated to latest revision Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of resolution; 5 part of resolution;
6 6
7 /** 7 /**
8 * [SignatureResolver] resolves function signatures. 8 * [SignatureResolver] resolves function signatures.
9 */ 9 */
10 class SignatureResolver extends MappingVisitor<FormalElementX> { 10 class SignatureResolver extends MappingVisitor<FormalElementX> {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 currentDefinitions = node; 72 currentDefinitions = node;
73 FormalElementX element = definition.accept(this); 73 FormalElementX element = definition.accept(this);
74 if (currentDefinitions.metadata != null) { 74 if (currentDefinitions.metadata != null) {
75 element.metadata = compiler.resolver.resolveMetadata(element, node); 75 element.metadata = compiler.resolver.resolveMetadata(element, node);
76 } 76 }
77 currentDefinitions = null; 77 currentDefinitions = null;
78 return element; 78 return element;
79 } 79 }
80 80
81 void validateName(Identifier node) { 81 void validateName(Identifier node) {
82 String name = node.source;
83 if (isOptionalParameter && 82 if (isOptionalParameter &&
84 optionalParametersAreNamed && 83 optionalParametersAreNamed &&
85 isPrivateName(node.source)) { 84 isPrivateName(node.source)) {
86 compiler.reportError(node, MessageKind.PRIVATE_NAMED_PARAMETER); 85 compiler.reportError(node, MessageKind.PRIVATE_NAMED_PARAMETER);
87 } 86 }
88 } 87 }
89 88
90 void computeParameterType(FormalElementX element, 89 void computeParameterType(FormalElementX element,
91 [VariableElement fieldElement]) { 90 [VariableElement fieldElement]) {
92 void computeFunctionType(FunctionExpression functionExpression) { 91 void computeFunctionType(FunctionExpression functionExpression) {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 402
404 DartType resolveReturnType(TypeAnnotation annotation) { 403 DartType resolveReturnType(TypeAnnotation annotation) {
405 if (annotation == null) return const DynamicType(); 404 if (annotation == null) return const DynamicType();
406 DartType result = resolver.resolveTypeAnnotation(annotation); 405 DartType result = resolver.resolveTypeAnnotation(annotation);
407 if (result == null) { 406 if (result == null) {
408 return const DynamicType(); 407 return const DynamicType();
409 } 408 }
410 return result; 409 return result;
411 } 410 }
412 } 411 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698