Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Dec 21, 2024
1 parent 5baa65d commit 5227258
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ssa/abitype.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,18 @@ func (b Builder) abiTypeOf(t types.Type) func() Expr {

func (b Builder) abiTupleOf(t *types.Tuple) func() Expr {
n := t.Len()
tuple := make([]Expr, n)
tuple := make([]func() Expr, n)
for i := 0; i < n; i++ {
tuple[i] = b.abiType(t.At(i).Type())
tuple[i] = b.abiTypeOf(t.At(i).Type())
}
return func() Expr {
prog := b.Prog
tSlice := prog.Slice(prog.AbiTypePtr())
return b.SliceLit(tSlice, tuple...)
elts := make([]Expr, n)
for i, fn := range tuple {
elts[i] = fn()
}
return b.SliceLit(tSlice, elts...)
}
}

Expand Down

0 comments on commit 5227258

Please sign in to comment.