summary refs log tree commit diff stats
path: root/tests/js/t11166.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/t11166.nim')
-rw-r--r--tests/js/t11166.nim20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/js/t11166.nim b/tests/js/t11166.nim
new file mode 100644
index 000000000..e98ccda10
--- /dev/null
+++ b/tests/js/t11166.nim
@@ -0,0 +1,20 @@
+discard """
+  output: '''
+test1
+test2
+'''
+"""
+
+import jsffi
+
+type
+  C = object
+    props: int
+
+var c: C
+
+when compiles(c.props):
+  echo "test1"
+
+when not compiles(d.props):
+  echo "test2"