]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: fix object path for grouped declaration statements
authorMark Freeman <mark@golang.org>
Wed, 19 Nov 2025 20:10:24 +0000 (15:10 -0500)
committerGopher Robot <gobot@golang.org>
Wed, 19 Nov 2025 21:38:11 +0000 (13:38 -0800)
commit4fef9f8b5596d42a2997fd8b74185d53fb7d0e43
tree6f16ab898406a0539f5cccaa5dd7a28f9ad0878c
parent33529db142dab098d4687f99e27e6284c31fa039
go/types, types2: fix object path for grouped declaration statements

CL 715840 deferred popping from the object path during handling of
grouped declaration statements, which leaves extra objects on the
path since this executes in a loop.

Surprisingly, no test exercised this. This change fixes this small
bug and adds a supporting test.

Fixes #76366

Change-Id: I7fc038b39d3871eea3e60855c46614b463bcfa4f
Reviewed-on: https://go-review.googlesource.com/c/go/+/722060
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/types2/decl.go
src/go/types/decl.go
src/internal/types/testdata/fixedbugs/issue76366.go [new file with mode: 0644]