gop icon indicating copy to clipboard operation
gop copied to clipboard

The compiler reportes a wrong line number

Open zrcoder opened this issue 3 years ago • 1 comments

When I run codes below on the Go+ Playground,

type Person struct {
	Name string
	Age  int
}

p := Person{
	Name: "bar",
	Age:  30
}
println(p.Name)

got a compile error:

GenGoPkg .
main.gop:6:2: expected declaration (and 1 more errors)

Infact, the real error line is 8 (missed , after Age: 30), not 6.

zrcoder avatar Sep 09 '21 09:09 zrcoder

There are more errors that are hidden. So the real problem is how to show all errors.

xushiwei avatar Sep 09 '21 22:09 xushiwei