summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2018-03-05 11:12:01 +0000
committerGitHub <noreply@github.com>2018-03-05 11:12:01 +0000
commit363c703e723238fc625e0047bd1baa3af6d47ac9 (patch)
tree876abdf0adf2af0c306943f6e24d34a2622125d9 /lib
parenta568e4dac6b3e338b4ad42c06be25a3d77b375f5 (diff)
parentb6c69dd45e9d06179de64bf47a6aea04521c500b (diff)
downloadNim-363c703e723238fc625e0047bd1baa3af6d47ac9.tar.gz
Merge pull request #7289 from alehander42/fix-asyncjs-pragma
Stop replacing all pragmas of a function with asyncjs
Diffstat (limited to 'lib')
-rw-r--r--lib/js/asyncjs.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/js/asyncjs.nim b/lib/js/asyncjs.nim
index 62444e49a..894102ca0 100644
--- a/lib/js/asyncjs.nim
+++ b/lib/js/asyncjs.nim
@@ -129,9 +129,10 @@ proc generateJsasync(arg: NimNode): NimNode =
       return `jsResolve`
     result.body.add(voidFix)
 
-  result.pragma = quote:
+  let asyncPragma = quote:
     {.codegenDecl: "async function $2($3)".}
 
+  result.addPragma(asyncPragma[0])
 
 macro async*(arg: untyped): untyped =
   ## Macro which converts normal procedures into