]> Cypherpunks repositories - gostls13.git/commit
[dev.unified] test: add switch test case for tricky nil handling
authorMatthew Dempsky <mdempsky@google.com>
Mon, 18 Jul 2022 20:02:02 +0000 (13:02 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 19 Jul 2022 23:30:49 +0000 (23:30 +0000)
commite971b6a9be7e10df28a9e9bbc6e3f6cf46201957
tree39680ca17778d74e81aa7e88ce5596e173f33951
parent878439cfe592165bdeaeed037bf1d3351e638853
[dev.unified] test: add switch test case for tricky nil handling

The next CL will change Unified IR's switch statement handling to
convert values to empty interface in some tricky cases. My initial
attempt at this accidentally mishandled `case nil:` in some cases, and
this wasn't caught by any existing tests. So this CL adds one.

Change-Id: Idcfaf0e869dca91be46d665e65d4623dc52bb60f
Reviewed-on: https://go-review.googlesource.com/c/go/+/418099
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
test/switch.go