summary refs log tree commit diff stats
path: root/tests/js/t17177.nim
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2021-03-03 18:57:34 +0800
committerGitHub <noreply@github.com>2021-03-03 11:57:34 +0100
commitec068a26870e5e00c87b05495622aae554c9a63a (patch)
treee7170fb20e16599cd296503534d3dfa4c3e5ba29 /tests/js/t17177.nim
parente417bd62f7937c09a1508db25b7cdb3a7f153632 (diff)
downloadNim-ec068a26870e5e00c87b05495622aae554c9a63a.tar.gz
fix #17177 (#17243)
* remove unnecessary when statement

* remove outdated codes

* fix #17177

* add testcase
Diffstat (limited to 'tests/js/t17177.nim')
-rw-r--r--tests/js/t17177.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/js/t17177.nim b/tests/js/t17177.nim
new file mode 100644
index 000000000..fc362cec1
--- /dev/null
+++ b/tests/js/t17177.nim
@@ -0,0 +1,10 @@
+import std/asyncjs
+
+proc fn1(n: int): Future[int] {.async.} = return n
+proc main2() =
+  proc fn2(n: int): Future[int] {.async.} = return n
+proc main3(a: auto) =
+  proc fn3(n: int): Future[int] {.async.} = return n
+proc main4() {.async.} =
+  proc fn4(n: int): Future[int] {.async.} = return n
+  discard