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

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

Issue 1560923002: Test and fix resynthesized FunctionTypeImpl type args/params. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/type.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_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/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index b66088678d103aca057461aad318c646fc87c135..e83b6619d47a447cf9a055e6cf0bf8470da9669a 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -265,7 +265,12 @@ class _LibraryResynthesizer {
new ConstructorElementImpl('', -1);
constructor.synthetic = true;
constructor.returnType = correspondingType;
- constructor.type = new FunctionTypeImpl(constructor);
+ constructor.type = new FunctionTypeImpl.elementWithNameAndArgs(
+ constructor,
+ null,
+ currentTypeParameters
+ .map((TypeParameterElement e) => e.type)
+ .toList());
memberHolder.addConstructor(constructor);
}
classElement.constructors = memberHolder.constructors;
@@ -447,7 +452,12 @@ class _LibraryResynthesizer {
} else {
executableElement.returnType = VoidTypeImpl.instance;
}
- executableElement.type = new FunctionTypeImpl(executableElement);
+ executableElement.type = new FunctionTypeImpl.elementWithNameAndArgs(
+ executableElement,
+ null,
+ currentTypeParameters
+ ?.map((TypeParameterElement e) => e.type)
+ ?.toList());
executableElement.hasImplicitReturnType =
serializedExecutable.hasImplicitReturnType;
executableElement.external = serializedExecutable.isExternal;
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/type.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698