]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: handle case of no specific target types in conversion
authorRobert Findley <rfindley@google.com>
Mon, 29 Nov 2021 22:39:19 +0000 (17:39 -0500)
committerRobert Findley <rfindley@google.com>
Mon, 29 Nov 2021 22:57:42 +0000 (22:57 +0000)
commit3ca57c7fb8bfc9b8b633f71a7aaa9de5fe76f63d
tree9083994db5ce26c2a7af3e9e37f008c3742a5c2f
parent186f375ecfdd0f9eae109464a93bb0ba8c993f45
go/types, types2: handle case of no specific target types in conversion

Avoid a panic by handling the case of no specific target type in a type
parameter to type parameter conversions.

Fixes #49864

Change-Id: I117dd80cc9d47c8c1e168f1caf0f281726270c84
Reviewed-on: https://go-review.googlesource.com/c/go/+/367616
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/types2/conversions.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue49864.go2 [new file with mode: 0644]
src/go/types/conversions.go
src/go/types/testdata/fixedbugs/issue49864.go2 [new file with mode: 0644]