]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: fix wrapper generation for imported generics
authorMatthew Dempsky <mdempsky@google.com>
Fri, 11 Jun 2021 09:44:16 +0000 (02:44 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Fri, 11 Jun 2021 17:18:40 +0000 (17:18 +0000)
commitef6c5be16025a1868fc27267b7abfb1c28329fe2
treecec09ae54978a014539a50a27f3e4e4ed16f7871
parent4a735ce0680e5ea6088da8072ba4c2b0076e51cb
[dev.typeparams] cmd/compile: fix wrapper generation for imported generics

This CL fixes reflectdata.methodWrapper to compile wrapper functions
for method expressions involving imported, instantiated interface
types. CL 322193 fixed a similar issue for generating wrappers for
imported, instantiated concrete types, but missed this case.

This is necessary to fix CL 326169's test case 10. However, that test
case is not included currently, because -G=3 mode crashes on method
expressions involving *any* instantiated interface type. Adding a test
will have to wait until either this issue is fixed in -G=3 mode, or
unified IR is merged.

Updates #46704.

Change-Id: Ib02d3c20e7c69d16288f1286cd1c98e7cbbba114
Reviewed-on: https://go-review.googlesource.com/c/go/+/327055
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Dan Scales <danscales@google.com>
Trust: Dan Scales <danscales@google.com>
Trust: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/reflectdata/reflect.go