We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
$ go version go version go1.18beta1 linux/amd64
No
go env
$ go env GOHOSTARCH="amd64" GOHOSTOS="linux"
Run go run main.go with the following contents:
go run main.go
package main type Job interface{} type Handler[Job Job] struct {}
An error announcing invalid type parameter declaration (?)
# command-line-arguments runtime: goroutine stack exceeds 1000000000-byte limit runtime: sp=0xc020460380 stack=[0xc020460000, 0xc040460000] fatal error: stack overflow runtime stack: runtime.throw({0xd20a11?, 0x12e92c0?}) /usr/local/go/src/runtime/panic.go:992 +0x71 runtime.newstack() /usr/local/go/src/runtime/stack.go:1101 +0x5cc runtime.morestack() /usr/local/go/src/runtime/asm_amd64.s:547 +0x8b goroutine 1 [running]: cmd/compile/internal/types2.under({0xe8d180?, 0xc0003d93b0?}) /usr/local/go/src/cmd/compile/internal/types2/type.go:23 +0x71 fp=0xc020460390 sp=0xc020460388 pc=0xb94451 cmd/compile/internal/types2.(*TypeParam).iface(0xc0003d93b0) /usr/local/go/src/cmd/compile/internal/types2/typeparam.go:104 +0x37 fp=0xc0204603e8 sp=0xc020460390 pc=0xb95077 cmd/compile/internal/types2.(*TypeParam).Underlying(0x0?) ... cmd/compile/internal/types2.(*TypeParam).Underlying(0x0?) /usr/local/go/src/cmd/compile/internal/types2/typeparam.go:88 +0x19 fp=0xc0204e1500 sp=0xc0204e14e8 pc=0xb94fb9 cmd/compile/internal/types2.under({0xe8d180?, 0xc00045b290?}) /usr/local/go/src/cmd/compile/internal/types2/type.go:27 +0x58 fp=0xc0204e1518 sp=0xc0204e1500 pc=0xb94438 ...additional frames elided...
The text was updated successfully, but these errors were encountered:
This seems to have been fixed on master:
./baz.go:5:18: cannot use a type parameter as constraint
Sorry, something went wrong.
Specifically this was fixed by 7a3a2b1.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run
go run main.go
with the following contents:What did you expect to see?
An error announcing invalid type parameter declaration (?)
What did you see instead?
The text was updated successfully, but these errors were encountered: