mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
libyul: Change assertThrow() to yulAssert()
This commit is contained in:
parent
921d52bfcd
commit
a52b50d770
@ -32,10 +32,10 @@ using namespace yul;
|
||||
|
||||
u256 yul::valueOfNumberLiteral(Literal const& _literal)
|
||||
{
|
||||
assertThrow(_literal.kind == LiteralKind::Number, OptimizerException, "");
|
||||
yulAssert(_literal.kind == LiteralKind::Number, "Expected number literal!");
|
||||
|
||||
std::string const& literalString = _literal.value.str();
|
||||
assertThrow(isValidDecimal(literalString) || isValidHex(literalString), OptimizerException, "");
|
||||
yulAssert(isValidDecimal(literalString) || isValidHex(literalString), "Invalid number literal!");
|
||||
return u256(literalString);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user