| Index: pkg/analyzer/lib/src/dart/element/type.dart
|
| diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
|
| index bf898e0e6a951804cfef9e06697f9c7beceb6c1c..32a12a59ae540f02077b3229773710ac3fe008d0 100644
|
| --- a/pkg/analyzer/lib/src/dart/element/type.dart
|
| +++ b/pkg/analyzer/lib/src/dart/element/type.dart
|
| @@ -1026,16 +1026,12 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType {
|
| // This type cast is safe, because we checked it above.
|
| FunctionType s = other as FunctionType;
|
| if (t.typeFormals.isNotEmpty) {
|
| - if (s.typeFormals.isEmpty) {
|
| - t = instantiateToBounds(t);
|
| - } else {
|
| - List<DartType> freshVariables = relateTypeFormals(t, s, returnRelation);
|
| - if (freshVariables == null) {
|
| - return false;
|
| - }
|
| - t = t.instantiate(freshVariables);
|
| - s = s.instantiate(freshVariables);
|
| + List<DartType> freshVariables = relateTypeFormals(t, s, returnRelation);
|
| + if (freshVariables == null) {
|
| + return false;
|
| }
|
| + t = t.instantiate(freshVariables);
|
| + s = s.instantiate(freshVariables);
|
| } else if (s.typeFormals.isNotEmpty) {
|
| return false;
|
| }
|
|
|