| Index: pkg/analyzer/lib/src/generated/resolver.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
|
| index d6e8567944d1db1a5597fe8e6ed37ac7cf0ecd80..0bc4a8869f64f219158b4393571aa33c42bb1c92 100644
|
| --- a/pkg/analyzer/lib/src/generated/resolver.dart
|
| +++ b/pkg/analyzer/lib/src/generated/resolver.dart
|
| @@ -8419,9 +8419,17 @@ class TypeNameResolver {
|
| typeArguments[i] = dynamicType;
|
| }
|
| }
|
| - type = typeSystem.instantiateType(type, typeArguments);
|
| + if (element is GenericTypeAliasElementImpl) {
|
| + type = element.typeAfterSubstitution(typeArguments) ?? dynamicType;
|
| + } else {
|
| + type = typeSystem.instantiateType(type, typeArguments);
|
| + }
|
| } else {
|
| - type = typeSystem.instantiateToBounds(type);
|
| + if (element is GenericTypeAliasElementImpl) {
|
| + type = element.typeAfterSubstitution(null) ?? dynamicType;
|
| + } else {
|
| + type = typeSystem.instantiateToBounds(type);
|
| + }
|
| }
|
| typeName.staticType = type;
|
| node.type = type;
|
| @@ -8486,7 +8494,7 @@ class TypeNameResolver {
|
| typeArguments[i] = _getType(arguments[i]);
|
| }
|
| }
|
| - return element.typeAfterSubstitution(typeArguments);
|
| + return element.typeAfterSubstitution(typeArguments) ?? dynamicType;
|
| }
|
| }
|
| return type;
|
|
|