mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #10753 from ethereum/ir-negate
Fix YulUtilFunctions::negateNumberWrappingFunction
This commit is contained in:
commit
afbf68f79c
@ -3765,7 +3765,7 @@ string YulUtilFunctions::negateNumberWrappingFunction(Type const& _type)
|
|||||||
return m_functionCollector.createFunction(functionName, [&]() {
|
return m_functionCollector.createFunction(functionName, [&]() {
|
||||||
return Whiskers(R"(
|
return Whiskers(R"(
|
||||||
function <functionName>(value) -> ret {
|
function <functionName>(value) -> ret {
|
||||||
value := <cleanupFunction>(sub(0, value)))
|
ret := <cleanupFunction>(sub(0, value))
|
||||||
}
|
}
|
||||||
)")
|
)")
|
||||||
("functionName", functionName)
|
("functionName", functionName)
|
||||||
|
@ -6,5 +6,7 @@ contract test {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ====
|
||||||
|
// compileViaYul: also
|
||||||
// ----
|
// ----
|
||||||
// f() -> true
|
// f() -> true
|
||||||
|
Loading…
Reference in New Issue
Block a user