summary refs log tree commit diff stats
path: root/tests/stmt/tmiscunderscore.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stmt/tmiscunderscore.nim')
-rw-r--r--tests/stmt/tmiscunderscore.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/stmt/tmiscunderscore.nim b/tests/stmt/tmiscunderscore.nim
new file mode 100644
index 000000000..c4bae1c3d
--- /dev/null
+++ b/tests/stmt/tmiscunderscore.nim
@@ -0,0 +1,15 @@
+import std/assertions
+
+block:
+  proc _() = echo "one"
+  doAssert not compiles(_())
+  proc _() = echo "two"
+  doAssert not compiles(_())
+
+block:
+  type _ = int
+  doAssert not (compiles do:
+    let x: _ = 3)
+  type _ = float
+  doAssert not (compiles do:
+    let x: _ = 3)