diff options
author | Matthew Dempsky <mdempsky@google.com> | 2021-05-17 10:47:04 -0700 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2021-05-19 06:29:40 +0000 |
commit | c92ae885d98d331ec489f6e705f2c5371e5f0e42 (patch) | |
tree | b0983eea0fed24775d02b21b6baa9bf564dd89c6 /src/cmd/compile/internal/types2/testdata | |
parent | 90b6e7260553a742522830ddd38f5854657f2985 (diff) | |
download | go-c92ae885d98d331ec489f6e705f2c5371e5f0e42.tar.gz go-c92ae885d98d331ec489f6e705f2c5371e5f0e42.zip |
[dev.typeparams] cmd/compile/internal/types2: better recv Var for method expressions
When synthesizing the Signature to represent a method expression, keep
as much of the original parameter as possible, substituting only the
receiver type.
Fixes #46209.
Change-Id: Ic4531820ae7d203bb0ba25a985f72d219b4aa25f
Reviewed-on: https://go-review.googlesource.com/c/go/+/320489
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/types2/testdata')
-rw-r--r-- | src/cmd/compile/internal/types2/testdata/check/decls0.src | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/compile/internal/types2/testdata/check/decls0.src b/src/cmd/compile/internal/types2/testdata/check/decls0.src index e78d8867e0..80bf4ebb3d 100644 --- a/src/cmd/compile/internal/types2/testdata/check/decls0.src +++ b/src/cmd/compile/internal/types2/testdata/check/decls0.src @@ -185,10 +185,10 @@ func f2(x *f2 /* ERROR "not a type" */ ) {} func f3() (x f3 /* ERROR "not a type" */ ) { return } func f4() (x *f4 /* ERROR "not a type" */ ) { return } -func (S0) m1(x S0 /* ERROR value .* is not a type */ .m1) {} -func (S0) m2(x *S0 /* ERROR value .* is not a type */ .m2) {} -func (S0) m3() (x S0 /* ERROR value .* is not a type */ .m3) { return } -func (S0) m4() (x *S0 /* ERROR value .* is not a type */ .m4) { return } +func (S0) m1(x S0 /* ERROR illegal cycle in method declaration */ .m1) {} +func (S0) m2(x *S0 /* ERROR illegal cycle in method declaration */ .m2) {} +func (S0) m3() (x S0 /* ERROR illegal cycle in method declaration */ .m3) { return } +func (S0) m4() (x *S0 /* ERROR illegal cycle in method declaration */ .m4) { return } // interfaces may not have any blank methods type BlankI interface { |