]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: method recv type parameter count must match base type parameter...
authorRobert Griesemer <gri@golang.org>
Thu, 24 Feb 2022 05:43:06 +0000 (21:43 -0800)
committerRobert Griesemer <gri@golang.org>
Thu, 24 Feb 2022 22:11:25 +0000 (22:11 +0000)
commitc0840a7c720061f1293063bad5d5648267a02ba8
treebdaab6b7163bb7cdd6aad2e97cb1579cb4ac64eb
parentc15527f0b05fe893e2630420747b128fe17566a6
go/types, types2: method recv type parameter count must match base type parameter count

Check receiver type parameter count when type checking the method
signature and report a suitable error (don't rely on delayed
instantiation and possibly constraint type inference).

While at it, simplify blank name recoding and type bound rewriting.

Stop-gap measure to avoid crashes in the compiler.

Fixes #51339.
For #51343.

Change-Id: Idbe2d32d69b66573ca973339f8924b349d2bc9cc
Reviewed-on: https://go-review.googlesource.com/c/go/+/387836
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
src/cmd/compile/internal/types2/assignments.go
src/cmd/compile/internal/types2/signature.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue51339.go2 [new file with mode: 0644]
src/go/types/assignments.go
src/go/types/signature.go
src/go/types/testdata/fixedbugs/issue51339.go2 [new file with mode: 0644]