solidity/test/libsolidity/syntaxTests/negation.sol
2022-04-01 23:41:18 -05:00

10 lines
201 B
Solidity

contract test {
function f() public pure {
int x;
uint y = uint(-x);
-y;
}
}
// ----
// TypeError 4907: (97-99='-y'): Unary operator - cannot be applied to type uint256