]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix missing typecheck for static initialization slice
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 14 Nov 2022 16:11:30 +0000 (23:11 +0700)
committerGopher Robot <gobot@golang.org>
Tue, 15 Nov 2022 17:35:03 +0000 (17:35 +0000)
commit03a18104735c78ad71cbd67d59b25bdc7fe8dcdf
tree1e26e284cb404a11ac778ac5e1b453a95c27be0a
parent80d487111ba8fe1d0ddcd04972046070e2e4bbe9
cmd/compile: fix missing typecheck for static initialization slice

CL 440455 fixed missing walk pass for static initialization slice.
However, slicelit may produce un-typechecked node, thus we need to do
typecheck for sinit before calling walkStmtList.

Fixes #56727

Change-Id: I40730cebcd09f2be4389d71c5a90eb9a060e4ab7
Reviewed-on: https://go-review.googlesource.com/c/go/+/450215
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/walk/complit.go
test/fixedbugs/issue56727.go [new file with mode: 0644]