diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2017-01-17 18:09:55 +0100 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2017-01-18 13:07:53 +0100 |
| commit | 9d963ea599613fa3c2ebef9e3faaad277bab26a3 (patch) | |
| tree | 48278d283f3f18934a1b4acc307bd2691ceb91f2 /sys | |
| parent | 41f1d1e486eb7c46f9bd1b084bf87e87a1b8d314 (diff) | |
prog: fix Size() for unions args
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/decl.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/decl.go b/sys/decl.go index de3554dbf..6c756fa07 100644 --- a/sys/decl.go +++ b/sys/decl.go @@ -327,11 +327,11 @@ func (t *StructType) Align() uintptr { type UnionType struct { TypeCommon Options []Type - varlen bool + Varlen bool } func (t *UnionType) Size() uintptr { - if t.varlen { + if t.Varlen { panic("union size is not statically known") } size := t.Options[0].Size() |
