cmd/go2go: crash when using an imported constraint with an embedded constraint #39868
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
)?Does this issue reproduce with the latest release?
Reproduces on abe4d3d
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
foo/lib/lib.go2:
foo/foo.go2:
C:\Users\argusdusty\Code\src\foo>go tool go2go build
What did you expect to see?
Successful compilation.
What did you see instead?
panic: runtime error: index out of range [0] with length 0
Stack Trace:
Based on my testing, this crash occurs when all of the following conditions are met:
F1() T
toF1() int
and similarly adjusting Foo will run fine, butF1(T)
,F1([]T)
,F1() []T
, etc. all crash.Foo
type doesn't need to filled in, or exist at all:func main() { lib.F2[int]() }
triggers the same compiler crash.The text was updated successfully, but these errors were encountered: