Re: [go-nuts] Bug: gofmt 1.9 can't handle go 1.9 code

2017-08-29 Thread Tong Sun
Oh, I'm sorry, I first noticed it from golang playground, then noticed the same behavior locally. But I forgot that my Emacs code formatting ties *not only* gofmt but also with `goimports`, where the problem really occurs. Sorry about making the fuzz. I'll recomiple goimports as well... On Wed,

Re: [go-nuts] Bug: gofmt 1.9 can't handle go 1.9 code

2017-08-29 Thread andrey mirtchovski
> Have you tried with gofmt 1.9 locally before posting? of course. that is what i showed in the original post: $ go version go version go1.9 darwin/amd64 $ gofmt t.go package main import ( "fmt" ) type myint = int func main() { var ii myint = 5 fmt.Println("Hello, playground#", ii)

Re: [go-nuts] Bug: gofmt 1.9 can't handle go 1.9 code

2017-08-29 Thread Caleb Spare
Works for me locally. I use both gofmt and goimports; for the latter, I had to recompile it. https://github.com/golang/go/issues/21645 is about updating the playground. On Tue, Aug 29, 2017 at 9:05 PM, Tong Sun wrote: > > > On Wednesday, August 30, 2017 at 12:02:28 AM UTC-4, andrey mirtchovski

Re: [go-nuts] Bug: gofmt 1.9 can't handle go 1.9 code

2017-08-29 Thread Tong Sun
On Wednesday, August 30, 2017 at 12:02:28 AM UTC-4, andrey mirtchovski wrote: > > occam's razor: most likely the playground is running an old gofmt. > Have you tried with gofmt 1.9 locally before posting? I have. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Bug: gofmt 1.9 can't handle go 1.9 code

2017-08-29 Thread andrey mirtchovski
occam's razor: most likely the playground is running an old gofmt. $ gofmt t.go package main import ( "fmt" ) type myint = int func main() { var ii myint = 5 fmt.Println("Hello, playground#", ii) } $ ~/go1.4/bin/gofmt t.go t.go:7:12: expected type, found '=' ... On Tue, Aug 29, 201

[go-nuts] Bug: gofmt 1.9 can't handle go 1.9 code

2017-08-29 Thread Tong Sun
Go 1.9 introduced type alias but the `gofmt` that comes with go 1.9 can't handle type alias. Demo here: https://play.golang.org/p/ldzfOJfj7V 7:11: expected type, found '=' (and 1 more errors) but it runs fine. -- You received this message because you are subscribed to the Google Groups "