diff options
author | chriseth <chris@ethereum.org> | 2018-10-16 23:58:17 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-10-22 21:52:26 +0800 |
commit | 19be6cd818e4bb1a49325d8bfea7f7727d85c933 (patch) | |
tree | fae4f0c8bb4ca4c32ede677466a6a8cfc2965fee /libyul/optimiser/SimplificationRules.cpp | |
parent | c13b5280c1b44f18a2a1fb61ef5556e91c5678e7 (diff) | |
download | dexon-solidity-19be6cd818e4bb1a49325d8bfea7f7727d85c933.tar.gz dexon-solidity-19be6cd818e4bb1a49325d8bfea7f7727d85c933.tar.zst dexon-solidity-19be6cd818e4bb1a49325d8bfea7f7727d85c933.zip |
Some well-formedness checks for the Yul AST.
Diffstat (limited to 'libyul/optimiser/SimplificationRules.cpp')
-rw-r--r-- | libyul/optimiser/SimplificationRules.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libyul/optimiser/SimplificationRules.cpp b/libyul/optimiser/SimplificationRules.cpp index 4d0468c7..aca943b0 100644 --- a/libyul/optimiser/SimplificationRules.cpp +++ b/libyul/optimiser/SimplificationRules.cpp @@ -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); } |