summary refs log tree commit diff stats
path: root/tests/compile
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-08-31 10:03:41 +0200
committerAraq <rumpf_a@web.de>2013-08-31 10:03:41 +0200
commite698d6255baac6bca1ba283a29141b83363d163d (patch)
tree0a6fcfe167dd0bc54314438447e49aa40dafa992 /tests/compile
parent6cc06cd35dc3aab58eb78757e76d5b72e5646c52 (diff)
downloadNim-e698d6255baac6bca1ba283a29141b83363d163d.tar.gz
fixes #563
Diffstat (limited to 'tests/compile')
-rw-r--r--tests/compile/tobjconstr2.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/compile/tobjconstr2.nim b/tests/compile/tobjconstr2.nim
index ef5446999..cb47e146d 100644
--- a/tests/compile/tobjconstr2.nim
+++ b/tests/compile/tobjconstr2.nim
@@ -6,3 +6,17 @@ var s{.exportc.}: seq[TFoo] = @[]
 s.add TFoo(x: 42)
 
 echo s[0].x
+
+
+# bug #563
+type
+  Foo =
+    object {.inheritable.}
+      x: int
+
+  Bar =
+    object of Foo
+      y: int
+
+var a = Bar(y: 100, x: 200) # works
+var b = Bar(x: 100, y: 200) # used to fail