mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-18 21:40:32 +00:00
fixes #5824
This commit is contained in:
@@ -470,7 +470,12 @@ proc genRecordFieldsAux(m: BModule, n: PNode,
|
||||
let a = genRecordFieldsAux(m, k, "$1.$2" % [ae, sname], rectype,
|
||||
check)
|
||||
if a != nil:
|
||||
add(unionBody, "struct {")
|
||||
if tfPacked notin rectype.flags:
|
||||
add(unionBody, "struct {")
|
||||
else:
|
||||
addf(unionBody, CC[cCompiler].structStmtFmt,
|
||||
[rope"struct", nil, rope(CC[cCompiler].packedPragma)])
|
||||
add(unionBody, "{")
|
||||
add(unionBody, a)
|
||||
addf(unionBody, "} $1;$n", [sname])
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user