• Daniel Martí's avatar
    cmd/vet: assume that no builtin funcs are pure · 2486ebfb
    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: 's avatarRobert Griesemer <gri@golang.org>
    2486ebfb
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...