Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
TotallyGamerJet authored and dennwc committed Dec 11, 2021
1 parent 64a08ac commit fd0016b
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions pointers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,35 @@ func bar(arg *A) {
func foo(arg *B) {
bar(&arg.A)
}
`,
},
{
name: "implicit array access",
src: `
struct s {
int i;
};
struct s ss[] = {
{0},
};
void foo() {
int i = ss->i;
}
`,
exp: `
type s struct {
I int32
}
var ss [1]s = [1]s{}
func foo() {
var i int32 = ss[0].I
_ = i
}
`,
},
{
Expand Down

0 comments on commit fd0016b

Please sign in to comment.