]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types2: adjust printing of type parameter in error
authorRobert Griesemer <gri@golang.org>
Mon, 1 Nov 2021 20:41:32 +0000 (13:41 -0700)
committerRobert Griesemer <gri@golang.org>
Tue, 2 Nov 2021 16:12:23 +0000 (16:12 +0000)
commit599de4b2c348738a5d6d2f5d475c74ac835e091a
tree6ba31b2b58da7378fd2054b7c4dcd023a3a8889c
parentd39c8739662835b2f92894a8550bbcd59f83557f
cmd/compile/internal/types2: adjust printing of type parameter in error

For constraint type inference failures where the type parameter doesn't
match the constraint, print the type parameter rather than its type name
object. This provides more flexibility for improving the error message
down the road.

Change-Id: I188871d6f26a16cd96e59770966a1ec65607b128
Reviewed-on: https://go-review.googlesource.com/c/go/+/360514
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/infer.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue45985.go2