From 6417e1ce8a25be7a8efe3fdb2e91ec2031db5809 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Mon, 27 Jan 2025 10:03:49 -0800 Subject: [PATCH] Elements. Migrate TypeConstraintGatherer. Change-Id: I321604b994d6aa63bf9e6b6de70bbe6a79f61f24 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/406060 Reviewed-by: Phil Quitslund Commit-Queue: Konstantin Shcheglov --- .../lib/src/dart/element/type_constraint_gatherer.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart b/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart index 360d3aedc71..7f549896d6f 100644 --- a/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart +++ b/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart @@ -2,8 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -// ignore_for_file: analyzer_use_new_elements - import 'package:_fe_analyzer_shared/src/type_inference/type_analyzer_operations.dart' as shared show @@ -191,7 +189,7 @@ class TypeConstraintGatherer extends shared.TypeConstraintGenerator< @override List? getTypeArgumentsAsInstanceOf( InterfaceType type, InterfaceElementImpl2 typeDeclaration) { - for (var interface in type.element.allSupertypes) { + for (var interface in type.element3.allSupertypes) { if (interface.element3 == typeDeclaration) { var substitution = Substitution.fromInterfaceType(type); var substitutedInterface =