diff options
| author | Alan Donovan <adonovan@google.com> | 2025-07-21 14:35:08 -0400 |
|---|---|---|
| committer | Alan Donovan <adonovan@google.com> | 2025-11-26 15:35:27 -0800 |
| commit | 0f6397384b583a18bae90421a71b6abad39a437f (patch) | |
| tree | 52287ed20a8b9a332bf30553c56efd6da6effc21 /src/runtime/stack.go | |
| parent | 992ad55e3dcea4bd017d618d759cb9cd3529f288 (diff) | |
| download | go-0f6397384b583a18bae90421a71b6abad39a437f.tar.xz | |
go/types: relax NewSignatureType for append(slice, str...)
CL 688815 contained a partial fix for the reported bug, but
NewSignatureType continued to panic. This change relaxes it
to permit construction of the type "func([]byte, B) []byte"
where "type B []byte". We must do so because a client
may instantiate the type "func([]byte, T...)" where [T ~string|~[]byte]
at T=B, and may have no way to know that they are dealing
with this very special edge case of append.
Added a regression test of NewSignatureType, which I should
have done in the earlier CL.
Also, make typestring less pedantic and fragile.
Fixes #73871
Change-Id: I3d8f8609582149f9c9f8402a04ad516c2c63bbc6
Reviewed-on: https://go-review.googlesource.com/c/go/+/689277
TryBot-Bypass: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Diffstat (limited to 'src/runtime/stack.go')
0 files changed, 0 insertions, 0 deletions
