Fix tuple assignments with multi-slot components.

This commit is contained in:
a3d4
2020-04-07 18:39:25 +02:00
committed by Daniel Kirchner
parent 823a119117
commit aba0b2957c
7 changed files with 108 additions and 3 deletions
+2 -2
View File
@@ -1108,12 +1108,12 @@ void CompilerUtils::convertType(
// Value shrank
for (unsigned j = targetSize; j < sourceSize; ++j)
{
moveToStackTop(depth - 1, 1);
moveToStackTop(depth + targetSize - sourceSize, 1);
m_context << Instruction::POP;
}
// Value grew
if (targetSize > sourceSize)
moveIntoStack(depth + targetSize - sourceSize - 1, targetSize - sourceSize);
moveIntoStack(depth - sourceSize, targetSize - sourceSize);
}
}
depth -= sourceSize;