summary refs log tree commit diff stats
path: root/tests/converter
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2022-04-06 22:17:09 +0800
committerGitHub <noreply@github.com>2022-04-06 16:17:09 +0200
commit5a995ffc53ac7c1a51ab62440a58af2f4e43963b (patch)
treee617742b477a3c526532634877f384a90226935e /tests/converter
parent83dabb69ae0f6c0bb269594a5b73af964b809bc7 (diff)
downloadNim-5a995ffc53ac7c1a51ab62440a58af2f4e43963b.tar.gz
fix #18986; Import/except doesn't work on devel [backport: 1.6] (#19687)
* fix #18986; Import/except doesn't work on devel [backport: 1.6]

* add testcase
Diffstat (limited to 'tests/converter')
-rw-r--r--tests/converter/m18986.nim3
-rw-r--r--tests/converter/t18986.nim10
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/converter/m18986.nim b/tests/converter/m18986.nim
new file mode 100644
index 000000000..0ebf343ae
--- /dev/null
+++ b/tests/converter/m18986.nim
@@ -0,0 +1,3 @@
+import std/macros
+
+converter Lit*(x: uint): NimNode = newLit(x)
diff --git a/tests/converter/t18986.nim b/tests/converter/t18986.nim
new file mode 100644
index 000000000..ef300fa49
--- /dev/null
+++ b/tests/converter/t18986.nim
@@ -0,0 +1,10 @@
+discard """
+  output: "Found a 0"
+"""
+
+import m18986 except Lit
+import std/macros
+
+# bug #18986
+var x = 0.uint
+echo "Found a ", x