-
Daniel Martí authored
That was the intention with the existing code, but it was buggy; builtin functions aren't treated as values by types.TypeAndVal. Thus, we should use the IsBuiltin method instead of IsValue. Teaching vet what builtin funcs are pure is already being tracked as a separate issue, #22851. While at it, also add a test with methods, just to be sure that the current logic doesn't break with that edge case either. Fixes #25303. Change-Id: Ic18402b22cceeabf76641c02f575b194b9a536cc Reviewed-on: https://go-review.googlesource.com/112177 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
2486ebfb