| Index: sdk/lib/_internal/compiler/implementation/dart_types.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/dart_types.dart b/sdk/lib/_internal/compiler/implementation/dart_types.dart
|
| index 8a2cab29efcfe5a6d64d742572c7e4bdb6d86997..f77fe3a061f3e67c7061ef284a689a7eceddc180 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/dart_types.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/dart_types.dart
|
| @@ -118,6 +118,8 @@ abstract class DartType {
|
| */
|
| TypeVariableType get typeVariableOccurrence => null;
|
|
|
| + void forEachTypeVariable(f(TypeVariableType variable)) {}
|
| +
|
| TypeVariableType _findTypeVariableOccurrence(Link<DartType> types) {
|
| for (Link<DartType> link = types; !link.isEmpty ; link = link.tail) {
|
| TypeVariableType typeVariable = link.head.typeVariableOccurrence;
|
| @@ -203,6 +205,10 @@ class TypeVariableType extends DartType {
|
|
|
| DartType get typeVariableOccurrence => this;
|
|
|
| + void forEachTypeVariable(f(TypeVariableType variable)) {
|
| + f(this);
|
| + }
|
| +
|
| accept(DartTypeVisitor visitor, var argument) {
|
| return visitor.visitTypeVariableType(this, argument);
|
| }
|
| @@ -407,6 +413,12 @@ abstract class GenericType extends DartType {
|
| return _findTypeVariableOccurrence(typeArguments);
|
| }
|
|
|
| + void forEachTypeVariable(f(TypeVariableType variable)) {
|
| + for (Link<DartType> link = typeArguments; !link.isEmpty; link = link.tail) {
|
| + link.head.forEachTypeVariable(f);
|
| + }
|
| + }
|
| +
|
| void visitChildren(DartTypeVisitor visitor, var argument) {
|
| DartType.visitList(typeArguments, visitor, argument);
|
| }
|
|
|