]> Cypherpunks repositories - gostls13.git/commit
go/internal/gcimporter: rewrite interface receiver parameters
authorMatthew Dempsky <mdempsky@google.com>
Wed, 3 Aug 2022 23:13:56 +0000 (16:13 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 4 Aug 2022 18:27:30 +0000 (18:27 +0000)
commit39728f412d5fb6d97568cc84a42f1caf07dbaedc
tree834ac5153aedb1a5c5b5546f23ea932befdb0cfe
parenta10afb15e060386615dcc0ecf2bd60ca3abbc04c
go/internal/gcimporter: rewrite interface receiver parameters

For a type definition like `type I interface{ M() }`, the go/types API
traditionally sets `M`'s receiver parameter type to `I`, whereas
Unified IR was (intentionally) leaving it as `interface{ M() }`.

I still think `interface{ M() }` is the more consistent and
semantically correct type to use in this scenario, but I concede that
users want `I` instead, as evidenced by existing tooling and tests.

Updates #49906.

Change-Id: I74ba5e8b08e4e98ed9dc49f72b7834d5b552058b
Reviewed-on: https://go-review.googlesource.com/c/go/+/421355
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
src/go/internal/gcimporter/gcimporter_test.go
src/go/internal/gcimporter/ureader.go
src/go/types/eval_test.go