]> Cypherpunks.ru repositories - gostls13.git/commit
go/types: parameterized functions must have a body
authorRobert Findley <rfindley@google.com>
Mon, 16 Aug 2021 16:07:27 +0000 (12:07 -0400)
committerRobert Findley <rfindley@google.com>
Mon, 16 Aug 2021 18:44:05 +0000 (18:44 +0000)
commit281ed619f87fb2d3758f9c378984a16f9d822401
tree47cc747c4a56af36407794af1b957d99dce7b3aa
parentaab1d1fcb9f7e77191085a192b2d0c061fd42df2
go/types: parameterized functions must have a body

This is a port of CL 340911 to go/types. The new check differs slightly,
due to go/ast storing type parameters on the function type, rather than
declaration. The error was positioned on the function name for
consistency with types2 (and because that's a better position).

Change-Id: Icdfc76cd65fab215139180b710293a0d79709297
Reviewed-on: https://go-review.googlesource.com/c/go/+/342475
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
20 files changed:
src/go/types/api_test.go
src/go/types/decl.go
src/go/types/testdata/check/issues.go2
src/go/types/testdata/check/map2.go2
src/go/types/testdata/check/tinference.go2
src/go/types/testdata/check/typeinst2.go2
src/go/types/testdata/check/typeparams.go2
src/go/types/testdata/examples/functions.go2
src/go/types/testdata/examples/inference.go2
src/go/types/testdata/examples/types.go2
src/go/types/testdata/fixedbugs/issue39634.go2
src/go/types/testdata/fixedbugs/issue39723.go2
src/go/types/testdata/fixedbugs/issue39725.go2
src/go/types/testdata/fixedbugs/issue39976.go2
src/go/types/testdata/fixedbugs/issue40038.go2
src/go/types/testdata/fixedbugs/issue40056.go2
src/go/types/testdata/fixedbugs/issue40684.go2
src/go/types/testdata/fixedbugs/issue41124.go2
src/go/types/testdata/fixedbugs/issue47127.go2
src/go/types/testdata/fixedbugs/issue47411.go2