Skip to content

Commit 1a057e0

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Migrate RecursiveTypeVisitor.
Change-Id: I3d94c61f0e73973b53ca3cf1f19ba28e9f993a39 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409161 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent d87c88a commit 1a057e0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pkg/analyzer/lib/src/dart/element/type_visitor.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// ignore_for_file: analyzer_use_new_elements
6-
75
import 'package:analyzer/dart/element/type.dart';
86
import 'package:analyzer/dart/element/type_visitor.dart';
97
import 'package:analyzer/src/dart/element/type.dart';
@@ -47,11 +45,11 @@ class RecursiveTypeVisitor extends UnifyingTypeVisitor<bool> {
4745
@override
4846
bool visitFunctionType(FunctionType type) => visitChildren([
4947
type.returnType,
50-
...type.typeFormals
51-
.map((formal) => formal.bound)
48+
...type.typeParameters
49+
.map((typeParameter) => typeParameter.bound)
5250
.where((type) => type != null)
5351
.map((type) => type!),
54-
...type.parameters.map((param) => param.type),
52+
...type.formalParameters.map((formalParameter) => formalParameter.type),
5553
]);
5654

5755
@override

0 commit comments

Comments
 (0)