Skip to content
New issue

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/ir: can't convert slice to array #1335

Closed
mvdan opened this issue Nov 18, 2022 · 2 comments
Closed

go/ir: can't convert slice to array #1335

mvdan opened this issue Nov 18, 2022 · 2 comments
Labels

Comments

@mvdan
Copy link
Contributor

mvdan commented Nov 18, 2022

$ staticcheck -version
staticcheck (devel, v0.4.0-0.dev.0.20221004230109-4229c3d955f8)
$ go version
go version devel go1.20-205f636e0a Fri Nov 18 08:04:52 2022 +0000 linux/amd64
$ staticcheck net/netip
panic: in net/netip.AddrFromSlice: cannot convert Load <[]byte> t0 ([]byte) to [4]byte

goroutine 232 [running]:
honnef.co/go/tools/go/ir.emitConv(0xc0016a4000, {0xa00e80, 0xc001591b20}, {0x9fc030?, 0xc000ba4258}, {0x9fb860, 0xc000957800})
	/home/mvdan/go/pkg/mod/honnef.co/go/[email protected]/go/ir/emit.go:293 +0xc05
honnef.co/go/tools/go/ir.(*builder).expr0(0xc000b63b50, 0xc0016a4000, {0x9fd448?, 0xc000957800?}, {0x7, {0x9fc030, 0xc000ba4258}, {0x0, 0x0}})
	/home/mvdan/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:610 +0x5d7
honnef.co/go/tools/go/ir.(*builder).expr(0xc00077fbd8?, 0xc0016a4000, {0x9fd448, 0xc000957800})
	/home/mvdan/go/pkg/mod/honnef.co/go/[email protected]/go/ir/builder.go:566 +0x1e7
[...]
@mvdan mvdan added bug needs-triage Newly filed issue that needs triage labels Nov 18, 2022
@dominikh dominikh removed the needs-triage Newly filed issue that needs triage label Nov 18, 2022
@dominikh dominikh changed the title "cannot convert" panic with the latest tip version of Go go/ir: can't convert slice to array Nov 19, 2022
@dominikh
Copy link
Owner

This is because we don't yet handle Go 1.20's new "slice to array" conversion.

@aarongable
Copy link

It looks like this fix has not yet been included in a tagged release. Now that go1.20 has been officially released, when do we expect a new version of this repo to be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants