Re: [go-nuts] Unused Variable Generates No Error

2017-12-13 Thread dc0d
Thanks for the reply. Already done that: https://github.com/golang/go/issues/23116 On Wednesday, December 13, 2017 at 2:15:25 PM UTC+3:30, rog wrote: > > On 13 December 2017 at 09:13, Jan Mercl <0xj...@gmail.com > > wrote: > > On Wed, Dec 13, 2017 at 10:04 AM dc0d > wrote: > > > >> This code

Re: [go-nuts] Unused Variable Generates No Error

2017-12-13 Thread roger peppe
On 13 December 2017 at 09:13, Jan Mercl <0xj...@gmail.com> wrote: > On Wed, Dec 13, 2017 at 10:04 AM dc0d wrote: > >> This code compiles and generates no errors. Why? > > It's legal code according to the language specification. To be fair, so is every other Go program with unused variables. This

Re: [go-nuts] Unused Variable Generates No Error

2017-12-13 Thread Jan Mercl
On Wed, Dec 13, 2017 at 10:04 AM dc0d wrote: > This code compiles and generates no errors. Why? It's legal code according to the language specification. -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group an

[go-nuts] Unused Variable Generates No Error

2017-12-13 Thread dc0d
This code compiles and generates no errors. Why? func f(v interface{}) { switch x := v.(type) { } } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts