mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
yul: Add optimizer exception to check that duplicate variable references do not occur on the LHS of a multi variable assignment statement
This commit is contained in:
parent
c16d7d0891
commit
4e55759144
@ -79,6 +79,7 @@ void DataFlowAnalyzer::operator()(Assignment& _assignment)
|
|||||||
set<YulString> names;
|
set<YulString> names;
|
||||||
for (auto const& var: _assignment.variableNames)
|
for (auto const& var: _assignment.variableNames)
|
||||||
names.emplace(var.name);
|
names.emplace(var.name);
|
||||||
|
assertThrow(names.size() == _assignment.variableNames.size(), OptimizerException, "");
|
||||||
assertThrow(_assignment.value, OptimizerException, "");
|
assertThrow(_assignment.value, OptimizerException, "");
|
||||||
clearKnowledgeIfInvalidated(*_assignment.value);
|
clearKnowledgeIfInvalidated(*_assignment.value);
|
||||||
visit(*_assignment.value);
|
visit(*_assignment.value);
|
||||||
|
Loading…
Reference in New Issue
Block a user