| 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 4a2362f7558f8eee6c78c44139bf845d6d7ce445..8ec251bef4edfbcaca5b1e11583da322bd94de0d 100644
|
| --- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| +++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| @@ -1600,6 +1600,12 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
|
| }
|
| ClassElement returnType = library.getType(elementName);
|
| if (returnType != null) {
|
| + if (returnType.typeParameters.isNotEmpty) {
|
| + // Caller can't deal with unbound type parameters, so substitute
|
| + // `dynamic`.
|
| + return returnType.type.substitute4(
|
| + returnType.typeParameters.map((_) => _dynamicType).toList());
|
| + }
|
| return returnType.type;
|
| }
|
| }
|
|
|