Merge pull request #5242 from ethereum/someChecks

Some well-formedness checks for the Yul AST.
This commit is contained in:
chriseth
2018-10-25 12:44:28 +02:00
committed by GitHub
9 changed files with 95 additions and 4 deletions
+1
View File
@@ -209,6 +209,7 @@ u256 Pattern::d() const
{
Literal const& literal = boost::get<Literal>(matchGroupValue());
assertThrow(literal.kind == assembly::LiteralKind::Number, OptimizerException, "");
assertThrow(isValidDecimal(literal.value) || isValidHex(literal.value), OptimizerException, "");
return u256(literal.value);
}