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
The Config.IgnoreFuncBodies setting causes go/types to skip checking function bodies for function declarations, but not function literals. This is surprising, and probably just an oversight as function literals are rare outside of function bodies. @heschi noticed this while working on some gopls optimizations.
Not urgent, since AFAICT nobody has complained in 5+ years, but if we decide this should be corrected the fix is of course trivial.
We should probably just fix that - I assume it's a simple if. I assume this can only happen for function literals used in package-level variable initializations with function literals, and perhaps contrived other top-level declarations using functions such as unsafe.Sizeof (or the like) which take function literal operands.
griesemer
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
labels
Apr 26, 2021
The
Config.IgnoreFuncBodies
setting causesgo/types
to skip checking function bodies for function declarations, but not function literals. This is surprising, and probably just an oversight as function literals are rare outside of function bodies. @heschi noticed this while working on some gopls optimizations.Not urgent, since AFAICT nobody has complained in 5+ years, but if we decide this should be corrected the fix is of course trivial.
CC @griesemer
The text was updated successfully, but these errors were encountered: