| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 this.definingType, this.name, ElementLocation location) | 617 this.definingType, this.name, ElementLocation location) |
| 618 : super(null, location); | 618 : super(null, location); |
| 619 | 619 |
| 620 @override | 620 @override |
| 621 Element get actualElement { | 621 Element get actualElement { |
| 622 ConstructorElement element = enclosingElement.getNamedConstructor(name); | 622 ConstructorElement element = enclosingElement.getNamedConstructor(name); |
| 623 return new ConstructorMember(element, definingType); | 623 return new ConstructorMember(element, definingType); |
| 624 } | 624 } |
| 625 | 625 |
| 626 @override | 626 @override |
| 627 AnalysisContext get context => definingType.element.context; |
| 628 |
| 629 @override |
| 627 String get displayName => name; | 630 String get displayName => name; |
| 628 | 631 |
| 629 @override | 632 @override |
| 630 ClassElement get enclosingElement { | 633 ClassElement get enclosingElement { |
| 631 return definingType.element; | 634 return definingType.element; |
| 632 } | 635 } |
| 633 } | 636 } |
| 634 | 637 |
| 635 /** | 638 /** |
| 636 * An instance of [_LibraryResynthesizer] is responsible for resynthesizing the | 639 * An instance of [_LibraryResynthesizer] is responsible for resynthesizing the |
| (...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2014 } | 2017 } |
| 2015 : () => this.element; | 2018 : () => this.element; |
| 2016 // TODO(paulberry): Is it a bug that we have to pass `false` for | 2019 // TODO(paulberry): Is it a bug that we have to pass `false` for |
| 2017 // isInstantiated? | 2020 // isInstantiated? |
| 2018 return new DeferredFunctionTypeImpl(computer, null, typeArguments, false); | 2021 return new DeferredFunctionTypeImpl(computer, null, typeArguments, false); |
| 2019 } else { | 2022 } else { |
| 2020 return null; | 2023 return null; |
| 2021 } | 2024 } |
| 2022 } | 2025 } |
| 2023 } | 2026 } |
| OLD | NEW |