Closed
Description
What version of Go are you using (go version
)?
go version go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env
)?
GOARCH="amd64"
GOHOSTOS="linux"
What did you do?
Run go vet on the code at https://play.golang.org/p/gKSNBMyRunJ
package fauxlock
type fl struct{}
func (l *fl) Lock() error { return nil }
type w struct{ fl }
func wrap(l *fl) w { return w{*l} }
What did you expect to see?
No output since *fl
does not implement sync.Locker
.
What did you see instead?
$ go vet
# _/home/.../lock-vet
./lock.go:9: literal copies lock value from *l: fauxlock.fl