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

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

Issue 2986393002: Record Typedef reference into Kernel FunctionType and resynthesyze typedefs in Analyzer. (Closed)
Patch Set: Drop @informative for typedefReference. Created 3 years, 4 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 | « no previous file | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/kernel/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/kernel/resynthesize.dart b/pkg/analyzer/lib/src/kernel/resynthesize.dart
index d3d0286bb3243a57e12e82b237ed2cb2116845db..189128029e9e84c8a167dd0e7564dde886a42130 100644
--- a/pkg/analyzer/lib/src/kernel/resynthesize.dart
+++ b/pkg/analyzer/lib/src/kernel/resynthesize.dart
@@ -106,6 +106,8 @@ class KernelResynthesizer {
} else if (parentName.name == '@methods') {
isMethod = true;
parentName = parentName.parent;
+ } else if (parentName.name == '@typedefs') {
+ parentName = parentName.parent;
}
ElementImpl parentElement = _getElement(parentName);
@@ -734,6 +736,12 @@ class _KernelUnitResynthesizerContextImpl
}
if (kernelType is kernel.FunctionType) {
+ if (kernelType.typedef != null) {
+ FunctionTypeAliasElementImpl element = libraryContext.resynthesizer
+ ._getElement(kernelType.typedef.canonicalName);
+ return element.type;
+ }
+
var functionElement = new FunctionElementImpl.synthetic([], null);
functionElement.enclosingElement = context;
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698