| 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 analyzer.src.dart.element.element; | 5 library analyzer.src.dart.element.element; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' show min; | 8 import 'dart:math' show min; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 6644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6655 } | 6655 } |
| 6656 } | 6656 } |
| 6657 | 6657 |
| 6658 if (!hasCovariant) { | 6658 if (!hasCovariant) { |
| 6659 return type; | 6659 return type; |
| 6660 } | 6660 } |
| 6661 | 6661 |
| 6662 List<ParameterElement> covariantParameters = parameters.map((parameter) { | 6662 List<ParameterElement> covariantParameters = parameters.map((parameter) { |
| 6663 DartType type = parameter.isCovariant ? objectType : parameter.type; | 6663 DartType type = parameter.isCovariant ? objectType : parameter.type; |
| 6664 return new ParameterElementImpl.synthetic( | 6664 return new ParameterElementImpl.synthetic( |
| 6665 parameter.name, objectType, parameter.parameterKind); | 6665 parameter.name, type, parameter.parameterKind); |
| 6666 }).toList(); | 6666 }).toList(); |
| 6667 | 6667 |
| 6668 return new FunctionElementImpl.synthetic(covariantParameters, returnType) | 6668 return new FunctionElementImpl.synthetic(covariantParameters, returnType) |
| 6669 .type; | 6669 .type; |
| 6670 } | 6670 } |
| 6671 } | 6671 } |
| 6672 | 6672 |
| 6673 /** | 6673 /** |
| 6674 * The constants for all of the modifiers defined by the Dart language and for a | 6674 * The constants for all of the modifiers defined by the Dart language and for a |
| 6675 * few additional flags that are useful. | 6675 * few additional flags that are useful. |
| (...skipping 2404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9080 | 9080 |
| 9081 @override | 9081 @override |
| 9082 void visitElement(Element element) { | 9082 void visitElement(Element element) { |
| 9083 int offset = element.nameOffset; | 9083 int offset = element.nameOffset; |
| 9084 if (offset != -1) { | 9084 if (offset != -1) { |
| 9085 map[offset] = element; | 9085 map[offset] = element; |
| 9086 } | 9086 } |
| 9087 super.visitElement(element); | 9087 super.visitElement(element); |
| 9088 } | 9088 } |
| 9089 } | 9089 } |
| OLD | NEW |