fixes #10082
This commit is contained in:
parent
dd33f41877
commit
062d7e3a39
2 changed files with 22 additions and 25 deletions
|
|
@ -391,6 +391,17 @@ type
|
|||
|
||||
assert sizeof(Bar) == 12
|
||||
|
||||
# bug #10082
|
||||
type
|
||||
A = int8 # change to int16 and get sizeof(C)==6
|
||||
B = int16
|
||||
C = object {.packed.}
|
||||
d {.bitsize: 1.}: A
|
||||
e {.bitsize: 7.}: A
|
||||
f {.bitsize: 16.}: B
|
||||
|
||||
assert sizeof(C) == 3
|
||||
|
||||
if failed:
|
||||
quit("FAIL")
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue