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

20 lines
455 B
Solidity

contract C {
function f() public pure returns (uint) {
uint _;
return _;
}
function g() public pure returns (uint) {
uint _ = 1;
return _;
}
function h() public pure {
_;
}
}
// ----
// DeclarationError 3726: (67-73='uint _'): The name "_" is reserved.
// DeclarationError 3726: (154-160='uint _'): The name "_" is reserved.
// DeclarationError 7576: (230-231='_'): Undeclared identifier.