summary refs log tree commit diff stats
path: root/tests/js
diff options
context:
space:
mode:
authorJake Leahy <jake@leahy.dev>2023-02-14 18:14:19 +1100
committerGitHub <noreply@github.com>2023-02-14 08:14:19 +0100
commitcac49694c011e851707cb3a86a3263c741559b3d (patch)
tree0655a6586ed1aa296da9088d9b739ce71b535e3f /tests/js
parent1d06c2b6cf84bcf65b67e88667dba4fd5e8ba519 (diff)
downloadNim-cac49694c011e851707cb3a86a3263c741559b3d.tar.gz
`std/asyncjs` allow transforming proc types (#21356)
* Add test case

* Implement JS async transform for nnkProcTy
Diffstat (limited to 'tests/js')
-rw-r--r--tests/js/tasyncjs.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/js/tasyncjs.nim b/tests/js/tasyncjs.nim
index 00753a16c..3de143643 100644
--- a/tests/js/tasyncjs.nim
+++ b/tests/js/tasyncjs.nim
@@ -94,4 +94,9 @@ proc main() {.async.} =
     doAssert "foobar: 7" in $reason.message
   echo "done" # justified here to make sure we're running this, since it's inside `async`
 
+block asyncPragmaInType:
+  type Handler = proc () {.async.}
+  proc foo() {.async.} = discard
+  var x: Handler = foo
+
 discard main()