You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package p
//line c.go:10
const C = 0 // file line = 4
//line t.go:20
type T int // file line = 7
//line v.go:30
var V T // file line = 10
//line f.go:40
func F() {} // file line = 13
records the following positions in the export data:
C c.go 4
T /Users/gri/tmp/x.go 14
V v.go 10
F f.go 13
Except for V they are all surprising, one way or the other. The output from the syntax package is as follows in this case:
By clearing out t.nod in copytype, we effectively lose the reference
from a Type back to its declaring OTYPE Node. This means later in
typenamesym when we add typenod(t) to signatlist, we end up creating a
new OTYPE Node. Moreover, this Node's position information will depend
on whatever context it happens be needed, and will be used for the
Type's position in the export data.
Updates #19391.
Change-Id: Ied93126449f75d7c5e3275cbdcc6fa657a8aa21d
Reviewed-on: https://go-review.googlesource.com/37870
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Compiling the following file:
records the following positions in the export data:
Except for V they are all surprising, one way or the other. The output from the syntax package is as follows in this case:
which shows consistent positions with the Name nodes (albeit they are off by 1).
The text was updated successfully, but these errors were encountered: