| OLD | NEW |
| 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 '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../dart_types.dart'; | 9 import '../dart_types.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| 11 import '../elements/modelx.dart' | 11 import '../elements/modelx.dart' |
| 12 show | 12 show |
| 13 ErroneousFieldElementX, | 13 ErroneousFieldElementX, |
| 14 ErroneousInitializingFormalElementX, | 14 ErroneousInitializingFormalElementX, |
| 15 FormalElementX, | 15 FormalElementX, |
| 16 FunctionElementX, | |
| 17 FunctionSignatureX, | 16 FunctionSignatureX, |
| 18 InitializingFormalElementX, | 17 InitializingFormalElementX, |
| 19 LocalParameterElementX; | 18 LocalParameterElementX; |
| 20 import '../tree/tree.dart'; | 19 import '../tree/tree.dart'; |
| 21 import '../universe/use.dart' show TypeUse; | 20 import '../universe/use.dart' show TypeUse; |
| 22 import '../util/util.dart' show Link, LinkBuilder; | 21 import '../util/util.dart' show Link, LinkBuilder; |
| 23 | |
| 24 import 'members.dart' show ResolverVisitor; | 22 import 'members.dart' show ResolverVisitor; |
| 25 import 'registry.dart' show ResolutionRegistry; | 23 import 'registry.dart' show ResolutionRegistry; |
| 26 import 'resolution_common.dart' show MappingVisitor; | 24 import 'resolution_common.dart' show MappingVisitor; |
| 27 import 'scope.dart' show Scope; | 25 import 'scope.dart' show Scope; |
| 28 | 26 |
| 29 /** | 27 /** |
| 30 * [SignatureResolver] resolves function signatures. | 28 * [SignatureResolver] resolves function signatures. |
| 31 */ | 29 */ |
| 32 class SignatureResolver extends MappingVisitor<FormalElementX> { | 30 class SignatureResolver extends MappingVisitor<FormalElementX> { |
| 33 final ResolverVisitor resolver; | 31 final ResolverVisitor resolver; |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 430 |
| 433 DartType resolveReturnType(TypeAnnotation annotation) { | 431 DartType resolveReturnType(TypeAnnotation annotation) { |
| 434 if (annotation == null) return const DynamicType(); | 432 if (annotation == null) return const DynamicType(); |
| 435 DartType result = resolver.resolveTypeAnnotation(annotation); | 433 DartType result = resolver.resolveTypeAnnotation(annotation); |
| 436 if (result == null) { | 434 if (result == null) { |
| 437 return const DynamicType(); | 435 return const DynamicType(); |
| 438 } | 436 } |
| 439 return result; | 437 return result; |
| 440 } | 438 } |
| 441 } | 439 } |
| OLD | NEW |