]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: do not fatal when typechecking conversion expression
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 3 Oct 2023 14:54:48 +0000 (21:54 +0700)
committerGopher Robot <gobot@golang.org>
Thu, 5 Oct 2023 19:44:52 +0000 (19:44 +0000)
commit38db0316f4e45704cc891026ea28dd566387de95
tree1db7e9e770609a8791c56c5a2f5a557e1228dd7e
parent62bdbd2596591bb2819a1614dd3c57ffeec667e3
cmd/compile: do not fatal when typechecking conversion expression

The types2 typechecker already reported all invalid conversions required
by the Go language spec. However, the conversion involves go pragma is
not specified in the spec, so is not checked by types2.

Fixing this by handling the error gracefully during typecheck, just like
how old typechecker did before CL 394575.

Fixes #63333

Change-Id: I04c4121971c62d96f75ded1794ab4bdf3a6cd0ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/532515
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/typecheck/expr.go
test/fixedbugs/issue63333.go [new file with mode: 0644]