std/asyncjs allow transforming proc types (#21356)
* Add test case * Implement JS async transform for nnkProcTy
This commit is contained in:
parent
1d06c2b6cf
commit
cac49694c0
2 changed files with 14 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue