From e075d92262a65d6132ad82cc432fcbb3e05de5e8 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Thu, 23 Jan 2025 17:41:36 -0800 Subject: [PATCH] Elements. Migrate DemotionVisitor. Change-Id: I4a869708a1e73897ecf0fc568363e5fca1986169 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405605 Reviewed-by: Phil Quitslund Commit-Queue: Konstantin Shcheglov --- pkg/analyzer/lib/src/dart/element/type_demotion.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/analyzer/lib/src/dart/element/type_demotion.dart b/pkg/analyzer/lib/src/dart/element/type_demotion.dart index 7f39ed3af476..f80a45a1643d 100644 --- a/pkg/analyzer/lib/src/dart/element/type_demotion.dart +++ b/pkg/analyzer/lib/src/dart/element/type_demotion.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:analyzer/dart/element/type.dart'; import 'package:analyzer/src/dart/element/replacement_visitor.dart'; import 'package:analyzer/src/dart/element/type.dart'; @@ -22,8 +20,8 @@ class DemotionVisitor extends ReplacementVisitor { return null; } - return TypeParameterTypeImpl( - element: type.element, + return TypeParameterTypeImpl.v2( + element: type.element3, nullabilitySuffix: type.nullabilitySuffix, alias: type.alias, );