summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2018-11-26 08:46:19 +0000
committerAndreas Rumpf <rumpf_a@web.de>2018-11-26 09:46:19 +0100
commitea5fc9f2040715788449e9031607eab0a1a4d8e7 (patch)
tree6a8b1729eb8d647a098507d67c61dc3960e0b6b3 /tests
parent2ac7f523889a39bf1e4c17af90686e33b9a65883 (diff)
downloadNim-ea5fc9f2040715788449e9031607eab0a1a4d8e7.tar.gz
fixes #9794: sizeof tuple is incorrect if contains imported object (#9795)
* fixes #9794

* Fix linux test
Diffstat (limited to 'tests')
-rw-r--r--tests/types/tfinalobj.nim19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/types/tfinalobj.nim b/tests/types/tfinalobj.nim
index 2fda73363..6a1c8c2ce 100644
--- a/tests/types/tfinalobj.nim
+++ b/tests/types/tfinalobj.nim
@@ -1,5 +1,6 @@
 discard """
-  output: "abc"
+  output: '''abc
+16 == 16'''
 """
 
 type
@@ -14,3 +15,19 @@ doAssert TA.sizeof == string.sizeof
 
 echo a.x
 
+##########################################
+# bug #9794
+##########################################
+type
+  imported_double {.importc: "double".} = object
+
+  Pod = object
+    v* : imported_double
+    seed*: int32
+
+  Pod2 = tuple[v: imported_double, seed: int32]
+
+proc test() =
+  echo sizeof(Pod), " == ",sizeof(Pod2)
+
+test()
\ No newline at end of file