]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: ensure signatures are instantiated if all type args
authorRobert Findley <rfindley@google.com>
Thu, 17 Nov 2022 01:58:58 +0000 (20:58 -0500)
committerRobert Findley <rfindley@google.com>
Fri, 18 Nov 2022 01:44:51 +0000 (01:44 +0000)
commit0789ca4951f9c72e0a09051783276e3730d6db06
tree18d6899e1f58f348d5ed065d78bb87dfbf246acd
parent7f75b72904e9d7ac512307514c29043ff604bacb
go/types, types2: ensure signatures are instantiated if all type args
are provided

Improve the accuracy of recorded types and instances for function calls,
by instantiating their signature before checking arguments if all type
arguments are provided. This avoids a problem where fully instantiated
function signatures are are not recorded as such following an error
checking their arguments.

Fixes golang/go#51803

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