summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-11-02 19:25:51 +0800
committerGitHub <noreply@github.com>2022-11-02 19:25:51 +0800
commit117a19d032b887d276103fe5c90c2062cb0a6349 (patch)
tree974f0e29b76199356be8554be8d2f35b75af67ce
parent606aa45ec6da3169cd3956d89d6f4eea23ad6419 (diff)
downloadNim-117a19d032b887d276103fe5c90c2062cb0a6349.tar.gz
closes #13618; add testcase (#20734)
-rw-r--r--tests/typerel/tsigmatch.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/typerel/tsigmatch.nim b/tests/typerel/tsigmatch.nim
new file mode 100644
index 000000000..7541f2028
--- /dev/null
+++ b/tests/typerel/tsigmatch.nim
@@ -0,0 +1,6 @@
+block: # bug #13618
+  proc test(x: Natural or BackwardsIndex): int =
+    int(x)
+
+  doAssert test(^1) == 1
+  doAssert test(1) == 1