-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
$ ls
gencode.schema main.go
$ cat main.go
package main
//go:generate gencode go -schema gencode.schema
func main() {
var x Foo
x.Unmarshal([]byte{})
}
$ cat gencode.schema
struct Foo {
Bar byte
}
$ go generate
$ go run main.go gencode.schema.gen.go
panic: runtime error: index out of range
goroutine 1 [running]:
main.(*Foo).Unmarshal(...)
/home/tv/go/src/eagain.net/2018/gencode-bug/gencode.schema.gen.go:45
main.main()
/home/tv/go/src/eagain.net/2018/gencode-bug/main.go:7 +0x11
exit status 2
$
Elojah and ubombi
Metadata
Metadata
Assignees
Labels
No labels