Skip to content

Commit b35bb73

Browse files
pqCommit Queue
authored andcommitted
[element model] migrate string_types
Change-Id: I31def5c451778f07733eaccd2110741e18638467 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403501 Commit-Queue: Phil Quitslund <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> Auto-Submit: Phil Quitslund <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent 9b8841a commit b35bb73

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

pkg/analyzer/analyzer_use_new_elements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ test/src/dart/element/name_union_test.dart
165165
test/src/dart/element/normalize_type_test.dart
166166
test/src/dart/element/nullable_test.dart
167167
test/src/dart/element/runtime_type_equality_test.dart
168-
test/src/dart/element/string_types.dart
169168
test/src/dart/element/subtype_test.dart
170169
test/src/dart/element/top_merge_test.dart
171170
test/src/dart/element/type_algebra_test.dart

pkg/analyzer/test/generated/elements_types_mixin.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ mixin ElementsTypesMixin {
434434
return fragment;
435435
}
436436

437-
ParameterElement namedParameter({
437+
ParameterElementImpl namedParameter({
438438
required String name,
439439
required DartType type,
440440
bool isCovariant = false,

pkg/analyzer/test/src/dart/element/string_types.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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-
import 'package:analyzer/dart/element/element.dart';
5+
import 'package:analyzer/dart/element/element2.dart';
66
import 'package:analyzer/dart/element/type.dart';
77
import 'package:analyzer/dart/element/type_visitor.dart';
88
import 'package:test/test.dart';
@@ -470,21 +470,21 @@ class _TypeParameterCollector extends TypeVisitor<void> {
470470
/// We don't need to print bounds for these type parameters, because
471471
/// they are already included into the function type itself, and cannot
472472
/// be promoted.
473-
final Set<TypeParameterElement> functionTypeParameters = {};
473+
final Set<TypeParameterElement2> functionTypeParameters = {};
474474

475475
@override
476476
void visitDynamicType(DynamicType type) {}
477477

478478
@override
479479
void visitFunctionType(FunctionType type) {
480-
functionTypeParameters.addAll(type.typeFormals);
481-
for (var typeParameter in type.typeFormals) {
480+
functionTypeParameters.addAll(type.typeParameters);
481+
for (var typeParameter in type.typeParameters) {
482482
var bound = typeParameter.bound;
483483
if (bound != null) {
484484
bound.accept(this);
485485
}
486486
}
487-
for (var parameter in type.parameters) {
487+
for (var parameter in type.formalParameters) {
488488
parameter.type.accept(this);
489489
}
490490
type.returnType.accept(this);
@@ -516,8 +516,8 @@ class _TypeParameterCollector extends TypeVisitor<void> {
516516

517517
@override
518518
void visitTypeParameterType(TypeParameterType type) {
519-
if (!functionTypeParameters.contains(type.element)) {
520-
var bound = type.element.bound;
519+
if (!functionTypeParameters.contains(type.element3)) {
520+
var bound = type.element3.bound;
521521

522522
if (bound == null) {
523523
return;
@@ -526,7 +526,7 @@ class _TypeParameterCollector extends TypeVisitor<void> {
526526
var str = '';
527527

528528
var boundStr = bound.getDisplayString();
529-
str += '${type.element.name} extends $boundStr';
529+
str += '${type.element3.name3} extends $boundStr';
530530

531531
typeParameters.add(str);
532532
}

0 commit comments

Comments
 (0)