File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
pkg/analysis_server/lib/src/services/completion/dart Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -720,9 +720,15 @@ extension AstNodeFeatureComputerExtension on AstNode {
720720 /// Return the [FunctionType] , if there is one, for this [AstNode] .
721721 FunctionType get functionType {
722722 if (parent is MethodInvocation ) {
723- return (parent as MethodInvocation ).staticInvokeType;
723+ var type = (parent as MethodInvocation ).staticInvokeType;
724+ if (type is FunctionType ) {
725+ return type;
726+ }
724727 } else if (parent is FunctionExpressionInvocation ) {
725- return (parent as FunctionExpressionInvocation ).staticInvokeType;
728+ var type = (parent as FunctionExpressionInvocation ).staticInvokeType;
729+ if (type is FunctionType ) {
730+ return type;
731+ }
726732 }
727733 return null ;
728734 }
You can’t perform that action at this time.
0 commit comments