//go:build badcopy

package main

import "sync"

type Locked struct {
	mu sync.Mutex
	n  int
}

// Intentionally wrong: copies an already usable lock by value.
func (v Locked) Value() int { v.mu.Lock(); defer v.mu.Unlock(); return v.n }
