You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(golang): mark GlobalVar dependencies as IsInvoked when directly called
When a package-scope variable holds a function value (e.g. `var Foo = func() {...}`)
and is invoked from another function body via `Foo()`, the parser previously only
recorded `Foo` as a plain GlobalVar dependency. Extend the existing directCalls
matching in parseFunc to also stamp Extra[IsInvoked]=true on GlobalVars, mirroring
the behavior already in place for FunctionCalls and MethodCalls.
Copy file name to clipboardExpand all lines: docs/uniast-en.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -432,7 +432,7 @@ Represents a dependency relationship, containing the dependent node Id, dependen
432
432
- Extra: Additional information for storing language-specific details or extra metadata
433
433
434
434
435
-
- IsInvoked: For function/method dependencies, whether it is invoked or just referenced (not executed).
435
+
- IsInvoked: For function/method dependencies, or for GlobalVars dependencies whose target is a func-typed global variable, whether it is invoked or just referenced (not executed). For example, given `var Foo = func() {...}`, if another function body contains `Foo()`, the corresponding dependency in that function's `GlobalVars` is marked `IsInvoked: true`; a plain reference such as `_ = Foo` is not marked.
0 commit comments