cmd/vet: builtin calls now return hasSideEffects false #25303
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
https://golang.org/cl/111416 made
hasSideEffects
return false whenCallExpr.Fun
has a trueIsValue
, but "Builtins are not considered values."This showed up in https://golang.org/cl/112255, where a call to
len
started being recognized as having no side-effects.len
indeed has no side effects, and it's probably a useful change as shown by the spotted new issue.However, I suspect not all built-ins are side-effects free.
/cc @griesemer @mvdan
The text was updated successfully, but these errors were encountered: