1
2 # golang.org/issue/40544: regression in error stacks for parse errors
3
4 env GO111MODULE=off
5 cd sandbox/foo
6 go list -e -json .
7 stdout '"sandbox/foo"'
8 stdout '"sandbox/bar"'
9 stdout '"Pos": "..(/|\\\\)bar(/|\\\\)bar.go:1:1"'
10 stdout '"Err": "expected ''package'', found ackage"'
11
12 env GO111MODULE=on
13 go list -e -json .
14 stdout '"sandbox/foo"'
15 stdout '"sandbox/bar"'
16 stdout '"Pos": "..(/|\\\\)bar(/|\\\\)bar.go:1:1"'
17 stdout '"Err": "expected ''package'', found ackage"'
18
19 -- sandbox/go.mod --
20 module sandbox
21
22 -- sandbox/foo/foo.go --
23 package pkg
24
25 import "sandbox/bar"
26 -- sandbox/bar/bar.go --
27 ackage bar
View as plain text