package main
type Key struct {
stuff1 string
stuff2 []string
}
type Val struct {
}
type MyMap struct {
map1 map[Key]*Val // compiles fine!
}
func main() {
var map2 map[Key]*Val // "invalid map key type Key"
}
Is this the correct behaviour, or a bug in go compiler?
I am using go-1.1 on Linux x64.