Index: pkg/analyzer/lib/src/dart/element/type.dart |
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart |
index fb855cb88da8d9abfb710b111b87e53f2f0bdffe..3e40fb67421c0c72e1bf847ff641e1dbd5157c84 100644 |
--- a/pkg/analyzer/lib/src/dart/element/type.dart |
+++ b/pkg/analyzer/lib/src/dart/element/type.dart |
@@ -137,19 +137,9 @@ class CircularFunctionTypeImpl extends DynamicTypeImpl |
TypeParameterElement.EMPTY_LIST; |
@override |
- List<TypeParameterElement> get _explicitTypeParameters => |
- TypeParameterElement.EMPTY_LIST; |
- |
- @override |
bool get _isInstantiated => false; |
@override |
- List<ParameterElement> get _parameters => ParameterElement.EMPTY_LIST; |
- |
- @override |
- DartType get _returnType => DynamicTypeImpl.instance; |
- |
- @override |
List<DartType> get _typeArguments => DartType.EMPTY_LIST; |
@override |
@@ -257,8 +247,7 @@ class DeferredFunctionTypeImpl extends FunctionTypeImpl { |
DeferredFunctionTypeImpl(this._computeElement, String name, |
List<DartType> typeArguments, bool isInstantiated) |
- : super._( |
- null, name, null, typeArguments, null, null, null, isInstantiated); |
+ : super._(null, name, null, typeArguments, isInstantiated); |
@override |
FunctionTypedElement get element { |
@@ -351,24 +340,6 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
List<TypeParameterElement> _typeParameters; |
/** |
- * The list of [typeParameters], if there is no element from which they can be |
- * computed, or `null` if they should be computed when necessary. |
- */ |
- final List<TypeParameterElement> _explicitTypeParameters; |
- |
- /** |
- * The return type of the function, or `null` if the return type should be |
- * accessed through the element. |
- */ |
- final DartType _returnType; |
- |
- /** |
- * The parameters to the function, or `null` if the parameters should be |
- * accessed through the element. |
- */ |
- final List<ParameterElement> _parameters; |
- |
- /** |
* True if this type is the result of instantiating type parameters (and thus |
* any type parameters bound by the typedef should be considered part of |
* [typeParameters] rather than [typeFormals]). |
@@ -388,7 +359,7 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
*/ |
FunctionTypeImpl(ExecutableElement element, |
[List<FunctionTypeAliasElement> prunedTypedefs]) |
- : this._(element, null, prunedTypedefs, null, null, null, null, false); |
+ : this._(element, null, prunedTypedefs, null, false); |
/** |
* Initialize a newly created function type to be declared by the given |
@@ -396,21 +367,7 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
*/ |
FunctionTypeImpl.elementWithNameAndArgs(Element element, String name, |
List<DartType> typeArguments, bool isInstantiated) |
- : this._(element, name, null, typeArguments, null, null, null, |
- isInstantiated); |
- |
- /** |
- * Initialize a newly created function type to represent a type described by |
- * a generic function type. |
- */ |
- FunctionTypeImpl.forGenericFunctionType( |
- List<TypeParameterElement> typeParameters, |
- List<DartType> typeArguments, |
- DartType returnType, |
- List<ParameterElement> parameters, |
- bool isInstantiated) |
- : this._(null, null, null, typeArguments, typeParameters, returnType, |
- parameters, isInstantiated); |
+ : this._(element, name, null, typeArguments, isInstantiated); |
/** |
* Initialize a newly created function type to be declared by the given |
@@ -418,34 +375,24 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
*/ |
FunctionTypeImpl.forTypedef(FunctionTypeAliasElement element, |
[List<FunctionTypeAliasElement> prunedTypedefs]) |
- : this._(element, element?.name, prunedTypedefs, null, null, null, null, |
- false); |
+ : this._(element, element?.name, prunedTypedefs, null, false); |
/** |
* Private constructor. |
*/ |
- FunctionTypeImpl._( |
- TypeParameterizedElement element, |
- String name, |
- this.prunedTypedefs, |
- this._typeArguments, |
- this._explicitTypeParameters, |
- this._returnType, |
- this._parameters, |
- this._isInstantiated) |
- : _typeParameters = _explicitTypeParameters, |
- super(element, name); |
+ FunctionTypeImpl._(TypeParameterizedElement element, String name, |
+ this.prunedTypedefs, this._typeArguments, this._isInstantiated) |
+ : super(element, name); |
/** |
* Return the base parameter elements of this function element. |
*/ |
- List<ParameterElement> get baseParameters => |
- _parameters ?? element.parameters; |
+ List<ParameterElement> get baseParameters => element.parameters; |
/** |
* Return the return type defined by this function's element. |
*/ |
- DartType get baseReturnType => _returnType ?? element.returnType; |
+ DartType get baseReturnType => element.returnType; |
@deprecated |
@override |
@@ -854,8 +801,8 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
newTypeArgs.addAll(typeArguments); |
newTypeArgs.addAll(argumentTypes); |
- return new FunctionTypeImpl._(element, name, prunedTypedefs, newTypeArgs, |
- _explicitTypeParameters, _returnType, _parameters, true); |
+ return new FunctionTypeImpl._( |
+ element, name, prunedTypedefs, newTypeArgs, true); |
} |
@override |
@@ -904,8 +851,8 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
List<DartType> typeArgs = typeArguments |
.map((DartType t) => (t as TypeImpl).pruned(prune)) |
.toList(growable: false); |
- return new FunctionTypeImpl._(element, name, prune, typeArgs, |
- _explicitTypeParameters, _returnType, _parameters, _isInstantiated); |
+ return new FunctionTypeImpl._( |
+ element, name, prune, typeArgs, _isInstantiated); |
} |
} |
@@ -931,8 +878,8 @@ class FunctionTypeImpl extends TypeImpl implements FunctionType { |
} |
List<DartType> typeArgs = |
TypeImpl.substitute(typeArguments, argumentTypes, parameterTypes); |
- return new FunctionTypeImpl._(element, name, prune, typeArgs, |
- _explicitTypeParameters, _returnType, _parameters, _isInstantiated); |
+ return new FunctionTypeImpl._( |
+ element, name, prune, typeArgs, _isInstantiated); |
} |
@override |