mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 14:25:23 +00:00
make tests green again
This commit is contained in:
@@ -300,7 +300,7 @@ macro `.()`*[K: string | cstring, V: proc](obj: JsAssoc[K, V],
|
||||
result = quote do:
|
||||
(`dotOp`(`obj`, `field`))()
|
||||
for elem in args:
|
||||
result[0].add elem
|
||||
result.add elem
|
||||
|
||||
# Iterators:
|
||||
|
||||
@@ -471,7 +471,7 @@ macro bindMethod*(procedure: typed): auto =
|
||||
# construct the `this` parameter:
|
||||
thisQuote = quote do:
|
||||
var `this` {. nodecl, importc .} : `thisType`
|
||||
call = newNimNode(nnkCall).add(rawProc[0], thisQuote[0][0][0][0])
|
||||
call = newNimNode(nnkCall).add(rawProc[0], thisQuote[0][0][0])
|
||||
# construct the procedure call inside the method
|
||||
if args.len > 2:
|
||||
for idx in 2..args.len-1:
|
||||
@@ -483,6 +483,6 @@ macro bindMethod*(procedure: typed): auto =
|
||||
params,
|
||||
rawProc[4],
|
||||
rawProc[5],
|
||||
newTree(nnkStmtList, thisQuote[0], call)
|
||||
newTree(nnkStmtList, thisQuote, call)
|
||||
)
|
||||
result = body
|
||||
|
||||
Reference in New Issue
Block a user