This commit is contained in:
Araq 2017-07-17 09:28:03 +02:00
commit 91eba77b96
4 changed files with 55 additions and 11 deletions

View file

@ -1,3 +1,13 @@
discard """
ouptut: '''TBar2
TFoo
16
12
16
12'''
"""
## XXX this output needs to be adapated for VCC which produces different results.
# It turned out that it's hard to generate correct for these two test cases at
# the same time.
@ -57,3 +67,25 @@ var aa = makeWindow()
thisCausesError(dd, aa)
# bug #4763
type
testObject_1 = object
size: int32
value: int64
testObject_2 {.packed.} = object
size: int32
value: int64
testObject_3[T] = object
size: int32
value: T
testObject_4 {.packed.} [T] = object
size: int32
value: T
echo sizeof(testObject_1)
echo sizeof(testObject_2)
echo sizeof(testObject_3[int64])
echo sizeof(testObject_4[int64])