Static Analyzer for Solidity
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
slither/tests/ast-parsing/function-0.5.0.sol

42 lines
1020 B

contract C1 {
// non-payable constructor
constructor() public {}
// non-payable fallback
function() external {}
}
contract C2 {
// payable constructor
constructor() public payable {}
// payable fallback
function() external payable {}
}
contract C3 {
// internal constructor
constructor() internal {}
modifier modifierNoArgs() { _; }
modifier modifierWithArgs(uint a) { _; }
function f() public modifierNoArgs modifierWithArgs(block.timestamp) {}
}
contract C4 {
function hasArgs(uint, uint) public {}
function hasReturns() public returns (uint) {}
function hasArgsAndReturns(uint a, uint b) public returns (uint c) {}
}
contract C5 {
function payableFunc() public payable {}
function externalFunc() external {}
function publicFunc() public {}
function internalFunc() internal {}
function privateFunc() private {}
function pureFunc() public pure {}
function viewFunc() public view {}
function abstractFunc() public;
}