]> Cypherpunks repositories - gostls13.git/commit
go/types: better error message for invalid untyped nil conversion
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 5 Oct 2021 16:53:07 +0000 (23:53 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 7 Oct 2021 14:37:45 +0000 (14:37 +0000)
commitebeab63d9515b539ae627f10cfc1766eecd243aa
tree97735cd532b48bc5f888c4ef6807546fd028ef6d
parent375a1fba0eb733676698ac3a9fdd12e6a8dd6602
go/types: better error message for invalid untyped nil conversion

This is port of CL 354049 for types2 to go/type.

The change is identical, but for some tweaks to the error message/position
in tests, since when go/types reports the exact operation "cannot convert"
instead of the general "invalid operation" like types2.

Updates #48784

Change-Id: I3e99f2721501d23187fd0a8970eb1de28e0c41d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/354050
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 Findley <rfindley@google.com>
src/go/types/errorcodes.go
src/go/types/expr.go
src/go/types/testdata/check/expr2.src