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

10 lines
250 B
Solidity

contract test {
function f(uint x) pure public {
uint y = +x;
y;
}
}
// ----
// SyntaxError 9636: (70-72='+x'): Use of unary + is disallowed.
// TypeError 4907: (70-72='+x'): Unary operator + cannot be applied to type uint256