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

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

Issue 1302333006: Support metadata on patches. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove partial renaming Created 5 years, 3 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 library dart2js.resolution.signatures; 5 library dart2js.resolution.signatures;
6 6
7 import '../compiler.dart' show 7 import '../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../diagnostics/invariant.dart' show 10 import '../diagnostics/invariant.dart' show
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if (node.modifiers.isStatic) { 95 if (node.modifiers.isStatic) {
96 compiler.reportError(node, MessageKind.FORMAL_DECLARED_STATIC); 96 compiler.reportError(node, MessageKind.FORMAL_DECLARED_STATIC);
97 } 97 }
98 98
99 if (currentDefinitions != null) { 99 if (currentDefinitions != null) {
100 internalError(node, 'function type parameters not supported'); 100 internalError(node, 'function type parameters not supported');
101 } 101 }
102 currentDefinitions = node; 102 currentDefinitions = node;
103 FormalElementX element = definition.accept(this); 103 FormalElementX element = definition.accept(this);
104 if (currentDefinitions.metadata != null) { 104 if (currentDefinitions.metadata != null) {
105 element.metadata = compiler.resolver.resolveMetadata(element, node); 105 element.metadataInternal =
106 compiler.resolver.resolveMetadata(element, node);
106 } 107 }
107 currentDefinitions = null; 108 currentDefinitions = null;
108 return element; 109 return element;
109 } 110 }
110 111
111 void validateName(Identifier node) { 112 void validateName(Identifier node) {
112 if (isOptionalParameter && 113 if (isOptionalParameter &&
113 optionalParametersAreNamed && 114 optionalParametersAreNamed &&
114 Name.isPrivateName(node.source)) { 115 Name.isPrivateName(node.source)) {
115 compiler.reportError(node, MessageKind.PRIVATE_NAMED_PARAMETER); 116 compiler.reportError(node, MessageKind.PRIVATE_NAMED_PARAMETER);
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 433
433 DartType resolveReturnType(TypeAnnotation annotation) { 434 DartType resolveReturnType(TypeAnnotation annotation) {
434 if (annotation == null) return const DynamicType(); 435 if (annotation == null) return const DynamicType();
435 DartType result = resolver.resolveTypeAnnotation(annotation); 436 DartType result = resolver.resolveTypeAnnotation(annotation);
436 if (result == null) { 437 if (result == null) {
437 return const DynamicType(); 438 return const DynamicType();
438 } 439 }
439 return result; 440 return result;
440 } 441 }
441 } 442 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698