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, );