Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1432)

Unified Diff: pkg/kernel/lib/ast.dart

Issue 2985293002: Add optional FunctionType.positionalParameterNames and use them to resynthesize function-type forma… (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/kernel/lib/ast.dart
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 3cd869b03f61ae03a8232c95f5ca021e020124d3..48b4dd14f10a9df12d1809b3454f99b6dcc2f572 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -4091,13 +4091,20 @@ class FunctionType extends DartType {
final int requiredParameterCount;
final List<DartType> positionalParameters;
final List<NamedType> namedParameters; // Must be sorted.
+
+ /// The optional names of [positionalParameters], might be empty, but
+ /// not `null`.
Siggi Cherem (dart-lang) 2017/07/31 17:43:08 it might be a bit confusing if positionalParameter
scheglov 2017/07/31 20:35:30 In flatbuffers every type has default value. For l
+ @informative
Siggi Cherem (dart-lang) 2017/07/31 17:43:07 General question about what we should do about @in
scheglov 2017/07/31 20:35:30 Well, ultimately any computation, which results we
+ final List<String> positionalParameterNames;
+
final DartType returnType;
int _hashCode;
FunctionType(List<DartType> positionalParameters, this.returnType,
{this.namedParameters: const <NamedType>[],
this.typeParameters: const <TypeParameter>[],
- int requiredParameterCount})
+ int requiredParameterCount,
+ this.positionalParameterNames: const <String>[]})
: this.positionalParameters = positionalParameters,
this.requiredParameterCount =
requiredParameterCount ?? positionalParameters.length;
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart ('k') | pkg/kernel/lib/binary/ast_from_binary.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698