The following code does not report a warning because of the self-assignment:
function f() external pure {
string storage s1;
s1 = s1; // self-assignment
string storage s2 = s1;
}
Now that we have inline-assembly access to the slots, the following code would be a better (more explicit) way of saying "please ignore the warning":
function f() external pure {
string storage s1;
assembly { s1.slot := 0 }
string storage s2 = s1;
}
Can we change the control-flow-analyzer accordingly, i.e. do not take assignments from variables into account which are themselves not yet initialized?
Reported by @magnus237:
The following code does not report a warning because of the self-assignment:
Now that we have inline-assembly access to the slots, the following code would be a better (more explicit) way of saying "please ignore the warning":
Can we change the control-flow-analyzer accordingly, i.e. do not take assignments from variables into account which are themselves not yet initialized?