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

Unified Diff: pkg/analyzer/lib/src/generated/static_type_analyzer.dart

Issue 2115743002: simplify inference of generic function types (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/lib/src/generated/type_system.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 5c57bb8f945f9fc4f3e3a3387fd54c159f8f7baa..896b0ab5110a2588e59546998ce9293d3bb668fd 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -1903,7 +1903,7 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
FunctionType inferred = ts.inferGenericFunctionCall(_typeProvider, fnType,
paramTypes, argTypes, InferenceContext.getType(node));
- if (inferred != node.staticInvokeType) {
+ if (inferred != null && inferred != node.staticInvokeType) {
// Fix up the parameter elements based on inferred method.
List<ParameterElement> inferredParameters =
ResolverVisitor.resolveArgumentsToParameters(
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/type_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698