Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #623 from abonie/fix_unpacking_function_arguments
Browse files Browse the repository at this point in the history
Fix unpacking function arguments
  • Loading branch information
freakboy3742 authored Aug 12, 2017
2 parents c7eb157 + 2b1c12f commit 0105f45
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 84 deletions.
8 changes: 6 additions & 2 deletions batavia/VirtualMachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1838,11 +1838,15 @@ VirtualMachine.prototype.call_function = function(arg, args, kwargs) {
namedargs[items[0]] = items[1]
}
if (kwargs) {
namedargs.update(kwargs)
for (let kv of kwargs.items()) {
namedargs[kv[0]] = kv[1]
}
}
var posargs = this.popn(lenPos)
if (args) {
posargs = posargs.concat(args)
for (let elem of args) {
posargs.push(elem)
}
}

var func = this.pop()
Expand Down
Loading

0 comments on commit 0105f45

Please sign in to comment.