gotypes: fix argument size for signatures without return types (#212)
This fixes a bug in argument size calculation in the case where the function has no return values. Previously it was padding the argument struct to max alignment, but this only happens if there are return values following. Updates #191
This commit is contained in:
committed by
GitHub
parent
e70c62b254
commit
7de02518a2
@@ -159,6 +159,7 @@ func TestSignatureSizes(t *testing.T) {
|
||||
{"func(uint64) uint64", 16},
|
||||
{"func([7]byte) byte", 9},
|
||||
{"func(uint64, uint64) (uint64, uint64)", 32},
|
||||
{"func(uint16)", 2},
|
||||
}
|
||||
for _, c := range cases {
|
||||
s, err := ParseSignature(c.Expr)
|
||||
|
||||
Reference in New Issue
Block a user