summary refs log tree commit diff stats
path: root/tests/modules
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-04-13 12:56:16 +0300
committerGitHub <noreply@github.com>2023-04-13 11:56:16 +0200
commit3f51b6f73ddc476c645f1e3e0205d2f203eaf8e2 (patch)
treec09632d8d7972deee15bfc1ff11197c926b8870e /tests/modules
parentc33ab0ba38408fc806b44246a3d393640d6fc9cb (diff)
downloadNim-3f51b6f73ddc476c645f1e3e0205d2f203eaf8e2.tar.gz
set module symbol type to None instead of nil for discard check (#21657)
* set module symbol type to None instead of nil

fixes #19225

* alright
Diffstat (limited to 'tests/modules')
-rw-r--r--tests/modules/tmodulesymtype.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/modules/tmodulesymtype.nim b/tests/modules/tmodulesymtype.nim
new file mode 100644
index 000000000..b1378ab69
--- /dev/null
+++ b/tests/modules/tmodulesymtype.nim
@@ -0,0 +1,15 @@
+discard """
+cmd: "nim check $file"
+"""
+
+# bug #19225
+import std/sequtils
+sequtils #[tt.Error
+^ expression has no type: sequtils]#
+proc foo() =
+  block: #[tt.Error
+  ^ expression has no type: block:
+  sequtils]#
+    sequtils
+
+foo()