cmd/compile: panic when using typeparams #46353
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Compiled from source from the
dev.typeparams
branch.Does this issue reproduce with the latest release?
No; support for typeparams is not yet released
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I attempted to write a Go program using type params. This example is distilled from real-world code to attempt to isolate the bug.
(running with
go run -gcflags=-G=3 test.go
as recommended in #46346)What did you expect to see?
I expected to see a successfully compiled program that exits ~immediately.
What did you see instead?
Perhaps interestingly, slight variations on the code seem to compile without issue. Any of these changes result in successful compilation:
s string
field from thestr[T i]
type.New
method and calling_ = str[*foo]{}
directly instead.foo
implementi
instead of*foo
, and calling_ = New[foo]()
.cc @ianlancetaylor @griesemer
The text was updated successfully, but these errors were encountered: