]> Cypherpunks repositories - gostls13.git/commit
go/types: fix conversions of constants to type parameter
authorRobert Findley <rfindley@google.com>
Tue, 2 Nov 2021 22:25:21 +0000 (18:25 -0400)
committerRobert Findley <rfindley@google.com>
Wed, 3 Nov 2021 00:06:52 +0000 (00:06 +0000)
commit32d27527a6dfb45a98d47a4a9ac5341028d79aa1
treeacadf2ffbe3cb2613baf41e095a329d07b93cb51
parenta0f373ca08b05eb97e4bff7e8710c023d94231c3
go/types: fix conversions of constants to type parameter

This is a port of both CL 360396 and CL 360796 to go/types. The latter
is added to avoid introducing an intermediate bug.

An error message was adjusted in issue49296.go2, with a TODO to switch
to the types2 error.

Change-Id: Iede294b69b4e097e53876498f039ee18667568c4
Reviewed-on: https://go-review.googlesource.com/c/go/+/360934
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/conversions.go
src/go/types/expr.go
src/go/types/predicates.go
src/go/types/testdata/fixedbugs/issue49247.go2 [new file with mode: 0644]
src/go/types/testdata/fixedbugs/issue49296.go2 [new file with mode: 0644]
src/go/types/testdata/spec/conversions.go2