You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import std/asyncjs
procfn1(n: int): Future[int] {.async.} =return n
procmain2() =procfn2(n: int): Future[int] {.async.} =return n
procmain3(a: auto) =procfn3(n: int): Future[int] {.async.} =return n
procmain4() {.async.} =procfn4(n: int): Future[int] {.async.} =return n # xxx bug: uncomment this and it worksdiscard
Current Output
/Users/timothee/git_clone/nim/timn/tests/nim/all/t11907.nim(11, 1) template/generic instantiation from here
/Users/timothee/git_clone/nim/timn/tests/nim/all/t11907.nim(12, 52) Error: type mismatch:
got 'Future[Future[system.int]]' for 'jsResolve(jsResolve(n))' [ref declared in /Users/timothee/git_clone/nim/Nim_devel/lib/js/asyncjs.nim(68, 3)]
but expected 'Future[system.int]' [ref declared in /Users/timothee/git_clone/nim/Nim_devel/lib/js/asyncjs.nim(68, 3)]
proc fn4(n: int): Future[int] {.async.} = return n
Example
Current Output
Expected Output
works
Additional Information
(a: int) {.async.} => await ...
anonymous procs inside an async proc which would be useful sugar for the newasyncjs.then
(asyncjs: addthen
,catch
for promise pipelining #16871)The text was updated successfully, but these errors were encountered: