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
dominikh opened this issue
Aug 21, 2018
· 1 comment
Labels
NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
package main
type T struct {
X *int
}
func id(x *int) (T, *int) { return T{new(int)}, x }
func main() {
a := new(int)
id(a)
}
with
t1 = id(t0) (T, *int)
the extended query x[1] will refer to T.X, not the second return value. The extended query parsing assumes that tuple offsets match node offsets 1 to 1, not taking into consideration that structs will be flattened, effectively yielding the tuple (T, *int, *int)
I intend on fixing this myself, eventually, unless someone beats me to it.
The text was updated successfully, but these errors were encountered:
NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
For
with
the extended query
x[1]
will refer toT.X
, not the second return value. The extended query parsing assumes that tuple offsets match node offsets 1 to 1, not taking into consideration that structs will be flattened, effectively yielding the tuple(T, *int, *int)
I intend on fixing this myself, eventually, unless someone beats me to it.
The text was updated successfully, but these errors were encountered: