diff --git a/libsolidity/codegen/YulUtilFunctions.cpp b/libsolidity/codegen/YulUtilFunctions.cpp index 52639a5f6..7d275e6f8 100644 --- a/libsolidity/codegen/YulUtilFunctions.cpp +++ b/libsolidity/codegen/YulUtilFunctions.cpp @@ -3765,7 +3765,7 @@ string YulUtilFunctions::negateNumberWrappingFunction(Type const& _type) return m_functionCollector.createFunction(functionName, [&]() { return Whiskers(R"( function (value) -> ret { - value := (sub(0, value))) + ret := (sub(0, value)) } )") ("functionName", functionName) diff --git a/test/libsolidity/semanticTests/various/flipping_sign_tests.sol b/test/libsolidity/semanticTests/various/flipping_sign_tests.sol index 922494be7..fb7587ffe 100644 --- a/test/libsolidity/semanticTests/various/flipping_sign_tests.sol +++ b/test/libsolidity/semanticTests/various/flipping_sign_tests.sol @@ -6,5 +6,7 @@ contract test { } } +// ==== +// compileViaYul: also // ---- // f() -> true