This commit is contained in:
chriseth 2020-01-14 17:17:20 +01:00
parent 180344ab17
commit fe35df4b78

View File

@ -378,7 +378,6 @@ bool AsmAnalyzer::operator()(Switch const& _switch)
if (!expectExpression(*_switch.expression)) if (!expectExpression(*_switch.expression))
success = false; success = false;
{
YulString caseType; YulString caseType;
bool mismatchingTypes = false; bool mismatchingTypes = false;
for (auto const& _case: _switch.cases) for (auto const& _case: _switch.cases)
@ -392,12 +391,12 @@ bool AsmAnalyzer::operator()(Switch const& _switch)
break; break;
} }
} }
if (mismatchingTypes) if (mismatchingTypes)
m_errorReporter.typeError( m_errorReporter.typeError(
_switch.location, _switch.location,
"Switch cases have non-matching types." "Switch cases have non-matching types."
); );
}
set<u256> cases; set<u256> cases;
for (auto const& _case: _switch.cases) for (auto const& _case: _switch.cases)