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

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

Issue 1658723005: Resynthesize static method references. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Move the 'no staticType check' comment. 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 | « no previous file | 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 daf1d1532e45e2880676246a5f5f587f7d3d4981..9f24549b4f963c3950f5f4eb8b901aa14f86a74f 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1694,15 +1694,17 @@ class _ReferenceInfo {
} else if (element is FunctionTypeAliasElementHandle) {
return new FunctionTypeImpl.elementWithNameAndArgs(
element, name, typeArguments, typeArguments.isNotEmpty);
- } else if (element is FunctionTypedElement &&
- implicitFunctionTypeIndices != null) {
- FunctionTypedElementComputer computer = () {
- FunctionTypedElement element = this.element;
- for (int index in implicitFunctionTypeIndices) {
- element = element.parameters[index].type.element;
- }
- return element;
- };
+ } else if (element is FunctionTypedElement) {
+ FunctionTypedElementComputer computer =
+ implicitFunctionTypeIndices != null
+ ? () {
+ FunctionTypedElement element = this.element;
+ for (int index in implicitFunctionTypeIndices) {
+ element = element.parameters[index].type.element;
+ }
+ return element;
+ }
+ : () => this.element;
// TODO(paulberry): Is it a bug that we have to pass `false` for
// isInstantiated?
return new DeferredFunctionTypeImpl(computer, null, typeArguments, false);
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698