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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_elements.dart

Issue 1540533002: Fix for typedef-typed field formal parameter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/summary_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/summarize_elements.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index 9a130200b7343825988b617bcd8e8e9060ba83ae..22ed80554777012ab55f95b4f276074e0fd3acea 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -447,7 +447,9 @@ class _LibrarySerializer {
/**
* Serialize the given [parameter] into an [UnlinkedParam].
*/
- UnlinkedParamBuilder serializeParam(ParameterElement parameter) {
+ UnlinkedParamBuilder serializeParam(ParameterElement parameter,
+ [Element context]) {
+ context ??= parameter;
UnlinkedParamBuilder b = new UnlinkedParamBuilder(ctx);
b.name = parameter.name;
switch (parameter.parameterKind) {
@@ -468,9 +470,11 @@ class _LibrarySerializer {
if (!type.returnType.isVoid) {
b.type = serializeTypeRef(type.returnType, parameter);
}
- b.parameters = type.parameters.map(serializeParam).toList();
+ b.parameters = type.parameters
+ .map((parameter) => serializeParam(parameter, context))
+ .toList();
} else {
- b.type = serializeTypeRef(type, parameter);
+ b.type = serializeTypeRef(type, context);
b.hasImplicitType = parameter.hasImplicitType;
}
return b;
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/summary_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698