| Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| index fa2bf1c4027e2e106f94caff586670f73d5e0ead..b788f13677fc66e1d23035f1c05ba154501f81fc 100644
|
| --- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| +++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| @@ -477,11 +477,16 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
|
|
|
| DartType functionType = InferenceContext.getType(node);
|
| if (functionType is FunctionType) {
|
| - DartType returnType = functionType.returnType;
|
| - if (computedType.isDynamic &&
|
| - !(returnType.isDynamic || returnType.isBottom)) {
|
| - computedType = returnType;
|
| - _resolver.inferenceContext.recordInference(node, functionType);
|
| + functionType = _resolver.matchFunctionTypeParameters(
|
| + node.typeParameters, functionType);
|
| +
|
| + if (functionType is FunctionType) {
|
| + DartType returnType = functionType.returnType;
|
| + if (computedType.isDynamic &&
|
| + !(returnType.isDynamic || returnType.isBottom)) {
|
| + computedType = returnType;
|
| + _resolver.inferenceContext.recordInference(node, functionType);
|
| + }
|
| }
|
| }
|
| }
|
|
|