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

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: 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
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 d60d4dce1b08e3e82c4aa971e37780ee6258d59c..09c0e6fb552a3b15990ccdf28376492fd4230cbe 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -1699,15 +1699,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);

Powered by Google App Engine
This is Rietveld 408576698