aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ExpressionCompiler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libsolidity/ExpressionCompiler.cpp b/libsolidity/ExpressionCompiler.cpp
index 909d3fe5..fde88a00 100644
--- a/libsolidity/ExpressionCompiler.cpp
+++ b/libsolidity/ExpressionCompiler.cpp
@@ -664,9 +664,8 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
// stack: newLength storageSlot slotOffset
arguments[0]->accept(*this);
// stack: newLength storageSlot slotOffset argValue
- TypePointer type = arguments[0]->annotation().type;
- utils().convertType(*type, *arrayType->baseType());
- type = arrayType->baseType();
+ TypePointer type = arguments[0]->annotation().type->closestTemporaryType(arrayType->baseType());
+ utils().convertType(*arguments[0]->annotation().type, *type);
utils().moveToStackTop(1 + type->sizeOnStack());
utils().moveToStackTop(1 + type->sizeOnStack());
// stack: newLength argValue storageSlot slotOffset