summary refs log tree commit diff stats
path: root/tests/objects
diff options
context:
space:
mode:
Diffstat (limited to 'tests/objects')
-rw-r--r--tests/objects/tobject3.nim32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/objects/tobject3.nim b/tests/objects/tobject3.nim
index 15dd8ea24..f3713ce22 100644
--- a/tests/objects/tobject3.nim
+++ b/tests/objects/tobject3.nim
@@ -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])