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:
James Tucker
2023-09-29 18:31:45 -07:00
committed by James Tucker
parent e03f0d5f5c
commit ab810f1f6d
5 changed files with 131 additions and 1 deletions

View 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
}