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
Reported by dsymonds about vet, but apparently a go/types issue.
package pkg
import (
"fmt"
"xpb" // not a standard package
)
func f() {
var h xpb.SomeEnum
fmt.Printf("%s", xpb.SomeEnum_name[int32(h)])
}
$ hg id
326a3ee842a2 tip
$ go tool vet -v x.go
vet: x.go:5:2: could not import xpb (can't find import: xpb)
Checking file x.go
x.go:10: arg xpb.SomeEnum_name[int32(h)] for printf verb %s of wrong type: uint8
I would expect the type reported here by go/types to be nil, but it's uint8. If it were
nil, vet wouldn't check it against the %s printf verb.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: