summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/texcl.nim27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/vm/texcl.nim b/tests/vm/texcl.nim
new file mode 100644
index 000000000..4ccfd6bfa
--- /dev/null
+++ b/tests/vm/texcl.nim
@@ -0,0 +1,27 @@
+discard """
+  output: '''false'''
+"""
+
+import macros
+
+type
+  nlOptions = enum
+    nloNone
+    nloDebug
+
+var nlOpts {.compileTime.} = {nloDebug}
+
+proc initOpts(): set[nlOptions] =
+  result.incl nloDebug
+  result.incl nloNone
+  result.excl nloDebug
+  
+const cOpts = initOpts()
+
+macro nlo(): stmt =
+  nlOpts.incl(nloNone)
+  nlOpts.excl(nloDebug)
+  result = newEmptyNode()
+
+nlo()
+echo nloDebug in cOpts
\ No newline at end of file