summary refs log tree commit diff stats
path: root/tests/js/timplicit_nodecl.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/timplicit_nodecl.nim')
-rw-r--r--tests/js/timplicit_nodecl.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/js/timplicit_nodecl.nim b/tests/js/timplicit_nodecl.nim
new file mode 100644
index 000000000..79a921815
--- /dev/null
+++ b/tests/js/timplicit_nodecl.nim
@@ -0,0 +1,13 @@
+discard """
+  output: '''22
+22'''
+"""
+
+# test implicit nodecl
+block:
+  {. emit: "var importMe = 22;" .}
+  var
+    a {. importc: "importMe" .}: int
+    importMe {. importc .}: int
+  echo a
+  echo importMe