| Index: pkg/analyzer/lib/src/generated/type_system.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
|
| index 5574aed89f2b09b3e9abf83af23f13bfb8b2f982..51945ec29601fdc2ee281a695d9af796f451f072 100644
|
| --- a/pkg/analyzer/lib/src/generated/type_system.dart
|
| +++ b/pkg/analyzer/lib/src/generated/type_system.dart
|
| @@ -851,7 +851,7 @@ class StrongTypeSystemImpl extends TypeSystem {
|
| if (identical(i1, i2)) {
|
| return true;
|
| }
|
| -
|
| +
|
| // Guard recursive calls
|
| _GuardedSubtypeChecker<InterfaceType> guardedInterfaceSubtype = _guard(
|
| (DartType i1, DartType i2, Set<Element> visited) =>
|
| @@ -932,14 +932,15 @@ class StrongTypeSystemImpl extends TypeSystem {
|
| // True if T == S
|
| // Or true if bound of S is S' and S' <: T
|
| if (t1 is TypeParameterType) {
|
| - if (t1 == t2) {
|
| + if (t2 is TypeParameterType &&
|
| + t1.definition == t2.definition &&
|
| + t1.bound == t2.bound) {
|
| return true;
|
| }
|
| if (guardedInferTypeParameter(t1, t2, visited)) {
|
| return true;
|
| }
|
| - DartType bound = t1.element.bound;
|
| - return bound == null ? false : guardedSubtype(bound, t2, visited);
|
| + return guardedSubtype(t1.bound, t2, visited);
|
| }
|
|
|
| if (t2 is TypeParameterType) {
|
|
|