]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: better error message for failing constraint type inference
authorRobert Griesemer <gri@golang.org>
Mon, 5 Dec 2022 22:09:09 +0000 (14:09 -0800)
committerGopher Robot <gobot@golang.org>
Mon, 5 Dec 2022 22:29:44 +0000 (22:29 +0000)
commit0b323a3c1690050340fc8e39730a07bb01373f0a
tree7f582fe9aa29533441d609b72b9c77fcec6c10d8
parent9e059630ad5b7f6ddd4cf4559cd111906776d5fb
go/types, types2: better error message for failing constraint type inference

We know the type argument against which constraint type inference fails:
print the type argument instead of the corresponding type parameter.

Fixes #57096.

Change-Id: Ia1da9c87fac6f8062e4d534b82e895fa4617fddc
Reviewed-on: https://go-review.googlesource.com/c/go/+/455278
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types2/infer.go
src/go/types/infer.go
src/internal/types/testdata/fixedbugs/issue45985.go