mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Turn unreachable error into assertion
This commit is contained in:
parent
3c4ef23809
commit
ded5d721d2
@ -530,10 +530,11 @@ void AsmAnalyzer::checkAssignment(Identifier const& _variable, YulString _valueT
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
if (Scope::Identifier const* var = m_currentScope->lookup(_variable.name))
|
if (Scope::Identifier const* var = m_currentScope->lookup(_variable.name))
|
||||||
{
|
{
|
||||||
// Check that it is a variable
|
// Check that it is a variable.
|
||||||
if (!holds_alternative<Scope::Variable>(*var))
|
// This can also hold a function, but that is caught by error 6041.
|
||||||
m_errorReporter.typeError(2657_error, _variable.location, "Assignment requires variable.");
|
yulAssert(holds_alternative<Scope::Variable>(*var), "Assignment requires variable.");
|
||||||
else if (!m_activeVariables.count(&std::get<Scope::Variable>(*var)))
|
|
||||||
|
if (!m_activeVariables.count(&std::get<Scope::Variable>(*var)))
|
||||||
m_errorReporter.declarationError(
|
m_errorReporter.declarationError(
|
||||||
1133_error,
|
1133_error,
|
||||||
_variable.location,
|
_variable.location,
|
||||||
|
@ -221,7 +221,7 @@ def examine_id_coverage(top_dir, source_id_to_file_names, new_ids_only=False):
|
|||||||
|
|
||||||
old_source_only_ids = {
|
old_source_only_ids = {
|
||||||
"1584", "1823",
|
"1584", "1823",
|
||||||
"1988", "2066", "2657", "2800", "3356",
|
"1988", "2066", "2800", "3356",
|
||||||
"3893", "3996", "4010", "4802",
|
"3893", "3996", "4010", "4802",
|
||||||
"5073", "5272", "5622", "7128",
|
"5073", "5272", "5622", "7128",
|
||||||
"7589", "7593", "8065", "8084", "8140",
|
"7589", "7593", "8065", "8084", "8140",
|
||||||
|
Loading…
Reference in New Issue
Block a user