]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: don't implicitly modify an argument function's type
authorRobert Griesemer <gri@golang.org>
Mon, 2 Oct 2023 22:47:08 +0000 (15:47 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 3 Oct 2023 21:21:52 +0000 (21:21 +0000)
commit51cb717d272545c2d4160f76a9f13741aa1e7abd
treeac8d453f9be40c6070741e9fe2ddfb62e7bd7227
parentdc523c8ddf5b0ce985ea90c65cbaa097c9e3ee09
go/types, types2: don't implicitly modify an argument function's type

See the comment in the (very small) fix for a detailed description.
Use the opportunity to introduce a generic clone function which may
be useful elsewhere.

Fixes #63260.

Change-Id: Ic63c6b8bc443011b1a201908254f7d062e1aec71
Reviewed-on: https://go-review.googlesource.com/c/go/+/532157
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types2/call.go
src/cmd/compile/internal/types2/issues_test.go
src/cmd/compile/internal/types2/predicates.go
src/go/types/call.go
src/go/types/issues_test.go
src/go/types/predicates.go