summary refs log tree commit diff stats
path: root/tests/objects/tobjconstr2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/objects/tobjconstr2.nim')
-rw-r--r--tests/objects/tobjconstr2.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/objects/tobjconstr2.nim b/tests/objects/tobjconstr2.nim
index cb47e146d..8ef7004e4 100644
--- a/tests/objects/tobjconstr2.nim
+++ b/tests/objects/tobjconstr2.nim
@@ -20,3 +20,15 @@ type
 
 var a = Bar(y: 100, x: 200) # works
 var b = Bar(x: 100, y: 200) # used to fail
+
+# bug 1275
+
+type
+  Graphic = object of TObject
+    case kind: range[0..1]
+    of 0:
+      radius: float
+    of 1:
+      size: tuple[w, h: float]
+
+var d = Graphic(kind: 1, size: (12.9, 6.9))