You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solang version: v0.3.3-70-g32a45ea1
Description: In solc + EVM, the value of y is 2, but in solang + SVM, the value of y is 0. The reason is that in Solang, delete data[0]; deletes the entire data. However, in Solc, delete data[0]; only deletes one element from data.
Reproduction: I set up a Solang compilation and execution environment to test the program.
contractC {
function len() publicreturns (uintret) {
uint[] memory data =newuint[](2);
data[0] =234;
data[1] =123;
delete data[0];
delete data[1];
assembly {
ret :=mload(data)
}
}
}