make case-object transitions explicit, make unknownLineInfo a const, replace a few magic numbers with consts (#13170)
This commit is contained in:
parent
2bf337abae
commit
796aafe7e0
35 changed files with 182 additions and 203 deletions
|
|
@ -366,11 +366,11 @@ proc computeSizeAlign(conf: ConfigRef; typ: PType) =
|
|||
OffsetAccum(maxAlign: 1)
|
||||
if tfUnion in typ.flags:
|
||||
if tfPacked in typ.flags:
|
||||
let info = if typ.sym != nil: typ.sym.info else: unknownLineInfo()
|
||||
let info = if typ.sym != nil: typ.sym.info else: unknownLineInfo
|
||||
localError(conf, info, "union type may not be packed.")
|
||||
accum = OffsetAccum(offset: szUnknownSize, maxAlign: szUnknownSize)
|
||||
elif accum.offset != 0:
|
||||
let info = if typ.sym != nil: typ.sym.info else: unknownLineInfo()
|
||||
let info = if typ.sym != nil: typ.sym.info else: unknownLineInfo
|
||||
localError(conf, info, "union type may not have an object header")
|
||||
accum = OffsetAccum(offset: szUnknownSize, maxAlign: szUnknownSize)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue