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, 2017 at 9:13 PM, Tong Sun <suntong...@gmail.com> wrote: > 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 > "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://groups.google.com/d/optout. -- 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://groups.google.com/d/optout.