substitute2 method

  1. @Deprecated("Use FunctionTypeAliasElement.instantiate()")
  2. @override
FunctionType substitute2(
  1. List<DartType> argumentTypes,
  2. List<DartType> parameterTypes
@Deprecated("Use FunctionTypeAliasElement.instantiate()"), override

Return the type resulting from substituting the given argumentTypes for the given parameterTypes in this type. The specification defines this operation in section 2:

The notation [x1, ..., xn/y1, ..., yn]E denotes a copy of E in which all occurrences of yi, 1 <= i <= n have been replaced with xi.
Note that, contrary to the specification, this method will not create a copy of this type if no substitutions were required, but will return this type directly.

Note too that the current implementation of this method is only guaranteed to work when the parameter types are type variables.


@Deprecated("Use FunctionTypeAliasElement.instantiate()")
FunctionType substitute2(
    List<DartType> argumentTypes, List<DartType> parameterTypes);