summary refs log tree commit diff stats
path: root/tests/objects
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-18 01:46:52 +0100
committerAraq <rumpf_a@web.de>2014-11-18 01:46:52 +0100
commit17736a1eb45b209c9957214ebb7455ade54fdcc4 (patch)
tree2e4cb24331ec5442b10c529eb2f80fe3ac43999d /tests/objects
parentc5cc20d33797f094a742c0a7f39a59e867a380f7 (diff)
downloadNim-17736a1eb45b209c9957214ebb7455ade54fdcc4.tar.gz
fixes #1274
Diffstat (limited to 'tests/objects')
-rw-r--r--tests/objects/tobjconstr2.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/objects/tobjconstr2.nim b/tests/objects/tobjconstr2.nim
index 8ef7004e4..39683ddc5 100644
--- a/tests/objects/tobjconstr2.nim
+++ b/tests/objects/tobjconstr2.nim
@@ -32,3 +32,19 @@ type
       size: tuple[w, h: float]
 
 var d = Graphic(kind: 1, size: (12.9, 6.9))
+
+# bug #1274
+type
+  K = enum Koo, Kar
+  Graphic2 = object of RootObj
+    case kind: K
+    of Koo:
+      radius: float
+    of Kar:
+      size: tuple[w, h: float]
+
+type NamedGraphic = object of Graphic2
+  name: string
+
+var ngr = NamedGraphic(kind: Koo, radius: 6.9, name: "Foo")
+echo ngr.name