]> Cypherpunks.ru repositories - gostls13.git/commit
go/types, types2: disallow real, imag, complex on type parameters
authorRobert Griesemer <gri@golang.org>
Mon, 31 Jan 2022 23:12:53 +0000 (15:12 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 1 Feb 2022 01:07:25 +0000 (01:07 +0000)
commit4fea5935f5f03b5037c792f8d5f5aa4cba90f1d6
tree96e235693e9f37ed9ff4567ce0fa26d03952c7af
parenteab9a77a60f5b6aaba978b61fbb260f2fbb307fb
go/types, types2: disallow real, imag, complex on type parameters

We can type-check these fine but the API implications are unclear.

Fixes #50912.
For #50937.

Change-Id: If29bbb4a257ff6a85e3bfcd4755fd8f90c80fb87
Reviewed-on: https://go-review.googlesource.com/c/go/+/382116
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types2/builtins.go
src/cmd/compile/internal/types2/testdata/fixedbugs/issue50912.go2 [new file with mode: 0644]
src/go/types/builtins.go
src/go/types/testdata/fixedbugs/issue50912.go2 [new file with mode: 0644]
test/typeparam/absdiff2.go
test/typeparam/absdiff3.go
test/typeparam/absdiffimp2.dir/a.go