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

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

Issue 2814443005: Fix for summarization of generic function type aliases and support for resynthesizing. (Closed)
Patch Set: Created 3 years, 8 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/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/public_namespace_computer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/prelink.dart
diff --git a/pkg/analyzer/lib/src/summary/prelink.dart b/pkg/analyzer/lib/src/summary/prelink.dart
index 1e64b4a91b95683d3a9d89f3592a1fb9b20d859d..e3c4401b0e1b62f72cdc164d96ea89c8d38db3ac 100644
--- a/pkg/analyzer/lib/src/summary/prelink.dart
+++ b/pkg/analyzer/lib/src/summary/prelink.dart
@@ -383,10 +383,18 @@ class _Prelinker {
executable.typeParameters.length));
}
for (UnlinkedTypedef typedef in unit.typedefs) {
- privateNamespace.add(
- typedef.name,
- new _Meaning(unitNum, ReferenceKind.typedef, 0,
- typedef.typeParameters.length));
+ ReferenceKind kind;
+ switch (typedef.style) {
+ case TypedefStyle.functionType:
+ kind = ReferenceKind.typedef;
+ break;
+ case TypedefStyle.genericFunctionType:
+ kind = ReferenceKind.genericFunctionTypedef;
+ break;
+ }
+ assert(kind != null);
+ privateNamespace.add(typedef.name,
+ new _Meaning(unitNum, kind, 0, typedef.typeParameters.length));
}
for (UnlinkedVariable variable in unit.variables) {
privateNamespace.add(variable.name,
« no previous file with comments | « pkg/analyzer/lib/src/summary/idl.dart ('k') | pkg/analyzer/lib/src/summary/public_namespace_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698