Fix bug in codegen for functions with multiple parameters.

Prior to this, all mutable param variables would be bound to the same parameter.
This commit is contained in:
Stefano Sanfilippo 2015-03-09 01:02:24 +01:00
parent 3ffdcf4b88
commit be503447b3

View File

@ -564,6 +564,7 @@ bool BitcodeEmitter::emit(Function const& node) {
);
d->builder.CreateStore(argToAlloc, alloc);
d->scope.push(arg.getName().getValue(), alloc);
++argToAlloc;
}
for (Statement const& stat: node.getBody()) {