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 {
720
720
/// Return the [FunctionType] , if there is one, for this [AstNode] .
721
721
FunctionType get functionType {
722
722
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
+ }
724
727
} 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
+ }
726
732
}
727
733
return null ;
728
734
}
You can’t perform that action at this time.
0 commit comments