Fix invokeVarArgs return value

This commit is contained in:
Ruslan Mustakov 2017-07-28 22:38:47 +07:00
commit 5884cb766a

View file

@ -230,8 +230,7 @@ macro invokeVarArgs(procIdent, objIdent;
invocation.add(argIdent) invocation.add(argIdent)
if hasReturnValue: if hasReturnValue:
let theCall = newNimNode(nnkBracketExpr).add(newNimNode(nnkDotExpr).add( let theCall = newNimNode(nnkBracketExpr).add(newNimNode(nnkDotExpr).add(
newCall("toGodot", newCall("newVariant", invocation)), newCall("toGodot", invocation), ident("godotVariant")))
ident("godotVariant")))
branchBody.add(getAst(initGodotVariantCall(ident("result"), theCall))) branchBody.add(getAst(initGodotVariantCall(ident("result"), theCall)))
else: else:
branchBody.add(invocation) branchBody.add(invocation)