summary refs log tree commit diff stats
path: root/lib/js
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2024-04-11 15:14:56 +0800
committerGitHub <noreply@github.com>2024-04-11 09:14:56 +0200
commit779bc8474b0e4d5d77d2619bd50eaa0fc111d1e6 (patch)
treed52d43d6a688b3cb93f2838c154e9096752489b8 /lib/js
parent2bd2f2885873f5eb2c722b3647fd11ee480a2452 (diff)
downloadNim-779bc8474b0e4d5d77d2619bd50eaa0fc111d1e6.tar.gz
fixes #4299 #12492 #10849; lambda lifting for JS backend (#23484)
fixes #4299 
fixes #12492 
fixes #10849

It binds `function` with `env`: `function.bind(:env)` to ease codegen
for now
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/jsffi.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/js/jsffi.nim b/lib/js/jsffi.nim
index 08b1c6db9..d50d58ae5 100644
--- a/lib/js/jsffi.nim
+++ b/lib/js/jsffi.nim
@@ -468,7 +468,7 @@ proc replaceSyms(n: NimNode): NimNode =
     for i in 0..<n.len:
       result[i] = replaceSyms(n[i])
 
-macro bindMethod*(procedure: typed): auto =
+macro bindMethod*(procedure: typed): auto {.deprecated: "Don't use it with closures".} =
   ## Takes the name of a procedure and wraps it into a lambda missing the first
   ## argument, which passes the JavaScript builtin `this` as the first
   ## argument to the procedure. Returns the resulting lambda.