diff options
author | chriseth <chris@ethereum.org> | 2018-10-25 18:44:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 18:44:28 +0800 |
commit | f714b0dd7c0b48ea2b93855e1cda9d1101b3f35c (patch) | |
tree | c207622e955dba0a4a9839dc42bbba7d9b86a329 /libyul | |
parent | 4076875927b279342dacf690f86bfc16af03dd67 (diff) | |
parent | a9a414bd0f6ba89bfd719ea6b6c8501861e0ece6 (diff) | |
download | dexon-solidity-f714b0dd7c0b48ea2b93855e1cda9d1101b3f35c.tar.gz dexon-solidity-f714b0dd7c0b48ea2b93855e1cda9d1101b3f35c.tar.zst dexon-solidity-f714b0dd7c0b48ea2b93855e1cda9d1101b3f35c.zip |
Merge pull request #5242 from ethereum/someChecks
Some well-formedness checks for the Yul AST.
Diffstat (limited to 'libyul')
-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); } |