summary refs log tree commit diff stats
path: root/tests/vm/tconstobj.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vm/tconstobj.nim')
-rw-r--r--tests/vm/tconstobj.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/vm/tconstobj.nim b/tests/vm/tconstobj.nim
new file mode 100644
index 000000000..414708945
--- /dev/null
+++ b/tests/vm/tconstobj.nim
@@ -0,0 +1,14 @@
+discard """
+  output: '''(name: hello)'''
+"""
+
+# bug #2774
+
+type Foo = object
+  name: string
+
+const fooArray = [
+  Foo(name: "hello")
+]
+
+echo fooArray[0]