Re: [go-nuts] invalid recursive type alias

2018-12-08 Thread Skip Tavakkolian
I think in the second case it is a reasonable error because the type alias has not been defined yet while the anonymous struct is being declared. On Sat, Dec 8, 2018, 9:33 AM Jan Mercl <0xj...@gmail.com wrote: > This code compiles fine > > package main > > type node struct { >

[go-nuts] invalid recursive type alias

2018-12-08 Thread Jan Mercl
This code compiles fine package main type node struct { next *node } func main() {} (https://play.golang.org/p/ZYg0EciQnOQ) This code does not package main type node = struct { next *node } func