diff --git a/test/libsolidity/semanticTests/operators/userDefined/literal_suffix_as_operator_definition.sol b/test/libsolidity/semanticTests/operators/userDefined/literal_suffix_as_operator_definition.sol index 7852967f4..e20850f44 100644 --- a/test/libsolidity/semanticTests/operators/userDefined/literal_suffix_as_operator_definition.sol +++ b/test/libsolidity/semanticTests/operators/userDefined/literal_suffix_as_operator_definition.sol @@ -2,23 +2,23 @@ type B is bool; using {bitnot as ~, bitor as |} for B global; // NOTE: There are no literals of type B so these cannot be actually used on anything -function bitnot(B x) pure suffix returns (B) { - return B.wrap(!B.unwrap(x)); -} - function bitor(B x, B y) pure suffix returns (B) { return B.wrap(B.unwrap(x) || B.unwrap(y)); } +function bitnot(B x) pure suffix returns (B) { + return B.wrap(!B.unwrap(x)); +} + contract C { function testBinary() pure public returns (B) { - B.wrap(true) | B.wrap(false); + return B.wrap(true) | B.wrap(false); } function testUnary() pure public returns (B) { - -B.wrap(true); + return ~B.wrap(true); } } // ---- -// testUnary() -> true -// testBinary() -> false +// testBinary() -> true +// testUnary() -> false