mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into breaking
This commit is contained in:
@@ -167,6 +167,17 @@ void AsmAnalyzer::operator()(Assignment const& _assignment)
|
||||
size_t const numVariables = _assignment.variableNames.size();
|
||||
yulAssert(numVariables >= 1, "");
|
||||
|
||||
set<YulString> variables;
|
||||
for (auto const& _variableName: _assignment.variableNames)
|
||||
if (!variables.insert(_variableName.name).second)
|
||||
m_errorReporter.declarationError(
|
||||
9005_error,
|
||||
_assignment.location,
|
||||
"Variable " +
|
||||
_variableName.name.str() +
|
||||
" occurs multiple times on the left-hand side of the assignment."
|
||||
);
|
||||
|
||||
vector<YulString> types = std::visit(*this, *_assignment.value);
|
||||
|
||||
if (types.size() != numVariables)
|
||||
|
||||
Reference in New Issue
Block a user