JS: gensym is stricter for 'this'; refs #12246 [backport]

(cherry picked from commit 63bcbea700)
This commit is contained in:
Araq
2019-09-30 13:21:46 +02:00
committed by narimiran
parent 95a655a975
commit 1e97abec96

View File

@@ -498,7 +498,7 @@ macro bindMethod*(procedure: typed): auto =
this = newIdentNode("this")
# construct the `this` parameter:
thisQuote = quote do:
var `this` {.nodecl, importc.} : `thisType`
var `this` {.nodecl, importc: "this".}: `thisType`
call = newNimNode(nnkCall).add(rawProc[0], thisQuote[0][0][0])
# construct the procedure call inside the method
if args.len > 2: