]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types2: print assignment operation for invalid operation errors
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 20 Oct 2021 02:55:26 +0000 (09:55 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 20 Oct 2021 05:28:45 +0000 (05:28 +0000)
commitb091189762980836527c4aa50e3693632aea5144
tree620c7e3ff0be9abad47679052220a20821e72257
parent4cc6a919077f27d9255536d6539118e65c1650a2
cmd/compile/internal/types2: print assignment operation for invalid operation errors

When invoking check.binary for assignment operation, the expression will
be nil, thus for printing the assignment operation error message, we
need to reconstruct the statement from lhs, op, rhs.

Fixes #48472

Change-Id: Ie38c3dd8069b47e508968d6e43cedcf7536559ef
Reviewed-on: https://go-review.googlesource.com/c/go/+/357229
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types2/expr.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue48472.go2