From 9d963ea599613fa3c2ebef9e3faaad277bab26a3 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Tue, 17 Jan 2017 18:09:55 +0100 Subject: prog: fix Size() for unions args --- sys/decl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') 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() -- cgit mrf-deployment