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

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

Issue 1561233003: support generic methods in FunctionExpressionInvocation node (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/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 b4ca685b99477835166c32bd459aa2d276ce10b7..6eaefaaad4e96cd1d92c67188343dd93a208e46c 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -493,15 +493,9 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
*/
@override
Object visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
- DartType functionStaticType = _getStaticType(node.function);
- DartType staticType;
- if (functionStaticType is FunctionType) {
- staticType = functionStaticType.returnType;
- } else {
- staticType = _dynamicType;
- }
+ DartType staticType = _computeInvokeReturnType(node.staticInvokeType);
_recordStaticType(node, staticType);
- DartType functionPropagatedType = node.function.propagatedType;
+ DartType functionPropagatedType = node.propagatedInvokeType;
if (functionPropagatedType is FunctionType) {
DartType propagatedType = functionPropagatedType.returnType;
_resolver.recordPropagatedTypeIfBetter(node, propagatedType);
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698