]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] go/types, types2: remove incorrect assertion (don't crash)
authorRobert Griesemer <gri@golang.org>
Thu, 10 Mar 2022 20:43:10 +0000 (12:43 -0800)
committerDmitri Shuralyov <dmitshur@golang.org>
Mon, 14 Mar 2022 16:24:26 +0000 (16:24 +0000)
commit8706c096227ce8a7f47798699232eac453a335dd
treea521e27b82475c9023bf7d5dabd9408a876ad402
parent2c6a889234651e96d64479a0581b22944fdab611
[release-branch.go1.18] go/types, types2: remove incorrect assertion (don't crash)

The removed assertion was never incorrect, as signatures may
be from methods in interfaces, and (some) interfaces set the
receivers of their methods (so we have a position for error
reporting).

This CL changes the issue below from a release blocker to an
issue for Go 1.19.

For #51593.

Change-Id: I0c5f2913b397b9ab557ed74a80cc7a715e840412
Reviewed-on: https://go-review.googlesource.com/c/go/+/391615
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 914195c132cbec651aa43c409e8aac2614b53b38)
Reviewed-on: https://go-review.googlesource.com/c/go/+/391796
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types2/infer.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue51593.go2 [new file with mode: 0644]
src/go/types/infer.go
src/go/types/testdata/fixedbugs/issue51593.go2 [new file with mode: 0644]