summaryrefslogtreecommitdiff
path: root/test/method7.go
Commit message (Collapse)AuthorAgeFilesLines
* [dev.typeparams] cmd/compile: fix MethodExpr handling with embedded fieldsDan Scales2021-01-261-0/+12
| | | | | | | | | | | | | | | | The recent refactoring of SelectorExpr code to helpers broke the handling of MethodExprs when there is an embedded field involved (e.g. test/method7.go, line 48). If there is an embedded field involved, the node op seen in DotMethod() is an ODOT rather than an OTYPE. Also, the receiver type of the result should be the original type, but the new code was using the last type after following the embedding path. Change-Id: I13f7ea6448b03d3e8f974103ee3a027219ca8388 Reviewed-on: https://go-review.googlesource.com/c/go/+/286176 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Dan Scales <danscales@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
* cmd/compile: fix method expressions with anonymous receiversMatthew Dempsky2018-04-061-4/+3
| | | | | | | | | | | | | | | | | Method expressions with anonymous receiver types like "struct { T }.m" require wrapper functions, which we weren't always creating. This in turn resulted in linker errors. This CL ensures that we generate wrapper functions for any anonymous receiver types used in a method expression. Fixes #22444. Change-Id: Ia8ac27f238c2898965e57b82a91d959792d2ddd4 Reviewed-on: https://go-review.googlesource.com/105044 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* test: disable broken test for 1.10Matthew Dempsky2017-12-041-2/+1
| | | | | | | | | | | | | This test was added recently as a regress test for the spec relaxation in #9060, but doesn't work correctly yet. Disable for now to fix noopt builders. Updates #22444. Change-Id: I45c521ae0da7ffb0c6859d6f7220c59828ac6149 Reviewed-on: https://go-review.googlesource.com/81775 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* test: add test cases for method expressions with literal receiver typesgriesemer2017-10-261-0/+57
For #9060. Change-Id: Ibd0f047083f3c98cec96c655a3e2024df8e1d2a0 Reviewed-on: https://go-review.googlesource.com/73554 Reviewed-by: Ian Lance Taylor <iant@golang.org>