Index: pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart |
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart |
index 437379a81070f3e67ff5e84fc436693903e33f56..3dc642ead97073bfafae5385c1f717a8043adb8e 100644 |
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart |
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart |
@@ -41,6 +41,7 @@ class KernelFunctionTypeBuilder extends FunctionTypeBuilder |
DartType builtReturnType = |
returnType?.build(library) ?? const DynamicType(); |
List<DartType> positionalParameters = <DartType>[]; |
+ List<String> positionalParameterNames = <String>[]; |
List<NamedType> namedParameters; |
int requiredParameterCount = 0; |
if (formals != null) { |
@@ -48,6 +49,7 @@ class KernelFunctionTypeBuilder extends FunctionTypeBuilder |
DartType type = formal.type?.build(library) ?? const DynamicType(); |
if (formal.isPositional) { |
positionalParameters.add(type); |
+ positionalParameterNames.add(formal.name ?? ''); |
if (formal.isRequired) requiredParameterCount++; |
} else if (formal.isNamed) { |
namedParameters ??= <NamedType>[]; |
@@ -68,7 +70,8 @@ class KernelFunctionTypeBuilder extends FunctionTypeBuilder |
return new FunctionType(positionalParameters, builtReturnType, |
namedParameters: namedParameters ?? const <NamedType>[], |
typeParameters: typeParameters ?? const <TypeParameter>[], |
- requiredParameterCount: requiredParameterCount); |
+ requiredParameterCount: requiredParameterCount, |
+ positionalParameterNames: positionalParameterNames); |
} |
Supertype buildSupertype(LibraryBuilder library) { |