diff options
| author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2026-03-03 23:10:05 +0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-06 10:31:11 -0800 |
| commit | bf1b0973db38346afae460e80d18020fa7de4e8c (patch) | |
| tree | ef25dfe835c7152f7813d4504911e8b9519ecb8a /test/fixedbugs | |
| parent | 252a8adbc08f5b8ae97d2a857bf12810da54a11c (diff) | |
| download | go-bf1b0973db38346afae460e80d18020fa7de4e8c.tar.xz | |
cmd/compile/internal/typecheck: simplify tcSliceHeader
types2 handles all constant-related bounds checks in user Go code now,
so it's safe to remove all constants checking in tcSliceHeader function.
Fixed #77919
Change-Id: Ibc137c84792d4898eb073cdeabac175684f73746
Reviewed-on: https://go-review.googlesource.com/c/go/+/751040
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Diffstat (limited to 'test/fixedbugs')
| -rw-r--r-- | test/fixedbugs/issue77919.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/fixedbugs/issue77919.go b/test/fixedbugs/issue77919.go new file mode 100644 index 0000000000..834331e49e --- /dev/null +++ b/test/fixedbugs/issue77919.go @@ -0,0 +1,15 @@ +// compile + +// Copyright 2026 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +var sink any + +func main() { + i := 0 + output := make([]string, 8, i) + sink = output +} |
