]> Cypherpunks repositories - gostls13.git/commit
cmd/compile, types2: avoid confusing follow-on error in invalid type assertion
authorRobert Griesemer <gri@golang.org>
Sun, 17 Oct 2021 03:30:12 +0000 (20:30 -0700)
committerRobert Griesemer <gri@golang.org>
Sun, 17 Oct 2021 04:27:13 +0000 (04:27 +0000)
commitcf51fb5d680a9a1ca98af3361e65722d07bff111
treed0c6e15ba0a363d848cbf79bd8057818c2aaeb10
parentfa7d11a0e9c0ed469111ba5fdd86f7462a48ef49
cmd/compile, types2: avoid confusing follow-on error in invalid type assertion

This CL avoids a useless follow-on error (that gets reported before the
actual error due to source position). This addresses the first part of
the issue below.

Thanks to @cuonglm for the suggestion for the fix.

For #49005.

Change-Id: Ifdd83072a05c32e115dc58a0233868a64f336f3f
Reviewed-on: https://go-review.googlesource.com/c/go/+/356449
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/types2/typexpr.go
test/fixedbugs/issue49005a.go [new file with mode: 0644]