solidity/test/libsolidity/syntaxTests/parsing/unary_plus_expression.sol

10 lines
241 B
Solidity
Raw Normal View History

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