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

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Issue 1140963002: Issue 23444. Use ConstructorMember(s) for super constructor fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 25dfa1c7a7f2360735720687f7393ce91ad2d730..cf8676db313a2ee6fedf1b343fbdb9f12dd7d2a7 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -562,10 +562,9 @@ class FixProcessor {
ClassDeclaration targetClassNode =
targetConstructor.parent as ClassDeclaration;
ClassElement targetClassElement = targetClassNode.element;
- ClassElement superClassElement = targetClassElement.supertype.element;
+ InterfaceType superType = targetClassElement.supertype;
// add proposals for all super constructors
- List<ConstructorElement> superConstructors = superClassElement.constructors;
- for (ConstructorElement superConstructor in superConstructors) {
+ for (ConstructorElement superConstructor in superType.constructors) {
String constructorName = superConstructor.name;
// skip private
if (Identifier.isPrivateName(constructorName)) {
@@ -626,11 +625,11 @@ class FixProcessor {
void _addFix_createConstructorSuperImplicit() {
ClassDeclaration targetClassNode = node.parent as ClassDeclaration;
ClassElement targetClassElement = targetClassNode.element;
- ClassElement superClassElement = targetClassElement.supertype.element;
+ InterfaceType superType = targetClassElement.supertype;
String targetClassName = targetClassElement.name;
// add proposals for all super constructors
- List<ConstructorElement> superConstructors = superClassElement.constructors;
- for (ConstructorElement superConstructor in superConstructors) {
+ for (ConstructorElement superConstructor in superType.constructors) {
+ superConstructor = ConstructorMember.from(superConstructor, superType);
String constructorName = superConstructor.name;
// skip private
if (Identifier.isPrivateName(constructorName)) {

Powered by Google App Engine
This is Rietveld 408576698