cmd/cloner: add regression test for slice nil/empty semantics
We had a misstep with the semantics when applying an optimization that showed up in the roll into corp. This test ensures that case and related cases must be retained. Updates #9410 Updates #9601 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:

committed by
James Tucker

parent
e03f0d5f5c
commit
ab810f1f6d
10
cmd/cloner/clonerex/clonerex.go
Normal file
10
cmd/cloner/clonerex/clonerex.go
Normal file
@ -0,0 +1,10 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:generate go run tailscale.com/cmd/cloner -clonefunc=true -type SliceContianer
|
||||
|
||||
package clonerex
|
||||
|
||||
type SliceContianer struct {
|
||||
Slice []*int
|
||||
}
|
Reference in New Issue
Block a user