• 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
..
asm Loading commit data...
buildtag Loading commit data...
cgo Loading commit data...
divergent Loading commit data...
incomplete Loading commit data...
tagtest Loading commit data...
testingpkg Loading commit data...
asm8.s Loading commit data...
assign.go Loading commit data...
atomic.go Loading commit data...
bool.go Loading commit data...
composite.go Loading commit data...
copylock.go Loading commit data...
copylock_func.go Loading commit data...
copylock_range.go Loading commit data...
deadcode.go Loading commit data...
httpresponse.go Loading commit data...
lostcancel.go Loading commit data...
method.go Loading commit data...
nilfunc.go Loading commit data...
print.go Loading commit data...
rangeloop.go Loading commit data...
shadow.go Loading commit data...
shift.go Loading commit data...
structtag.go Loading commit data...
unsafeptr.go Loading commit data...
unused.go Loading commit data...