| Index: pkg/analyzer/lib/src/summary/link.dart
|
| diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
|
| index 6ed601185e1a7c4d0260281fb60d9171fdbf4651..c805aebf36d9b8fdce6f91e5cddf7c0d5dcf8fb5 100644
|
| --- a/pkg/analyzer/lib/src/summary/link.dart
|
| +++ b/pkg/analyzer/lib/src/summary/link.dart
|
| @@ -189,10 +189,8 @@ EntityRefBuilder _createLinkedType(
|
| result.paramReference =
|
| typeParameterContext.typeParameterNestingLevel - element.nestingLevel;
|
| } else {
|
| - // Out-of-scope type parameters only occur in circumstances where they
|
| - // are irrelevant (i.e. when a type parameter is unused). So we can
|
| - // safely convert them to `dynamic`.
|
| - result.reference = compilationUnit.addRawReference('dynamic');
|
| + throw new StateError('The type parameter $type (in ${element?.location}) '
|
| + 'is out of scope on ${typeParameterContext?.location}.');
|
| }
|
| return result;
|
| } else if (type is FunctionType) {
|
|
|