diff options
author | Jake Leahy <jake@leahy.dev> | 2023-02-14 18:14:19 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 08:14:19 +0100 |
commit | cac49694c011e851707cb3a86a3263c741559b3d (patch) | |
tree | 0655a6586ed1aa296da9088d9b739ce71b535e3f /tests/js | |
parent | 1d06c2b6cf84bcf65b67e88667dba4fd5e8ba519 (diff) | |
download | Nim-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.nim | 5 |
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() |