Re: [go-nuts] Bug or not?

2018-05-10 Thread Jan Mercl
On Thu, May 10, 2018 at 1:00 PM roger peppe wrote: > "The scope of a type identifier declared inside a function begins at > the identifier in the TypeSpec and ends at the end of the innermost > containing block." That's it, thanks. Got bitten by the difference wrt variable decls within a fn. T

Re: [go-nuts] Bug or not?

2018-05-10 Thread Matthias B.
On Thu, 10 May 2018 08:33:32 + Jan Mercl <0xj...@gmail.com> wrote: > This modified example from another thread does not compile: You modified it in a pretty significant way. The original example had type T = *T which is a recursive type alias (which is disallowed). Your new example has typ

Re: [go-nuts] Bug or not?

2018-05-10 Thread roger peppe
The error seems correct to me. From the spec: "The scope of a type identifier declared inside a function begins at the identifier in the TypeSpec and ends at the end of the innermost containing block." So the type declaration in main is a recursive type - the T it refers to is not the previously

[go-nuts] Bug or not?

2018-05-10 Thread Jan Mercl
This modified example from another thread does not compile: package main import ( "fmt" ) type T int func main() { var v T type T *T var w T w = &v *w = v

[go-nuts] bug or not?

2017-05-03 Thread T L
https://github.com/golang/go/issues/20219 -- 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+unsubscr...@googlegroups.com. For more options, visit https