mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
10 lines
258 B
Solidity
10 lines
258 B
Solidity
contract test {
|
|
function f() public pure {
|
|
int x;
|
|
uint y = uint(-x);
|
|
-y;
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError 4907: (97-99): Built-in unary operator - cannot be applied to type uint256. Unary negation is only allowed for signed integers.
|