| Index: pkg/analyzer/lib/src/summary/resynthesize.dart
|
| diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| index a6620cc6f5b8f6920815ab98cf92b9ebfb2964e1..fc9cf16b698cd36e199c1010cd03b03a4ada0d18 100644
|
| --- a/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| +++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| @@ -1256,11 +1256,23 @@ class _ReferenceInfo {
|
| */
|
| DartType buildType(bool instantiateToBoundsAllowed, int numTypeArguments,
|
| DartType getTypeArgument(int i), List<int> implicitFunctionTypeIndices) {
|
| - DartType result =
|
| - (numTypeParameters == 0 && implicitFunctionTypeIndices.isEmpty)
|
| - ? type
|
| - : _buildType(instantiateToBoundsAllowed, numTypeArguments,
|
| - getTypeArgument, implicitFunctionTypeIndices);
|
| + DartType result;
|
| + if (numTypeParameters == 0 && implicitFunctionTypeIndices.isEmpty) {
|
| + if (element is GenericTypeAliasElementHandle) {
|
| + List<DartType> argumentTypes = <DartType>[];
|
| + for (int i = 0; i < numTypeArguments; i++) {
|
| + argumentTypes.add(getTypeArgument(i));
|
| + }
|
| + GenericTypeAliasElementImpl actualElement =
|
| + (element as GenericTypeAliasElementHandle).actualElement;
|
| + result = actualElement.typeAfterSubstitution(argumentTypes);
|
| + } else {
|
| + result = type;
|
| + }
|
| + } else {
|
| + result = _buildType(instantiateToBoundsAllowed, numTypeArguments,
|
| + getTypeArgument, implicitFunctionTypeIndices);
|
| + }
|
| if (result == null) {
|
| return DynamicTypeImpl.instance;
|
| }
|
| @@ -1837,6 +1849,11 @@ class _UnitResynthesizer {
|
| case ReferenceKind.typedef:
|
| element = new FunctionTypeAliasElementHandle(
|
| summaryResynthesizer, location);
|
| + if ((element as ElementHandle).actualElement
|
| + is GenericTypeAliasElement) {
|
| + element = new GenericTypeAliasElementHandle(
|
| + summaryResynthesizer, location);
|
| + }
|
| isDeclarableType = true;
|
| break;
|
| case ReferenceKind.variable:
|
|
|