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/e2e/solc_parsing/test_data/function-0.7.1.sol

61 lines
1.4 KiB

4 years ago
contract C1 {
// non-payable constructor
constructor() {}
fallback() external {}
receive() external payable {}
}
contract C2 {
// payable constructor
constructor() payable {}
fallback() external {}
receive() external payable {}
}
abstract 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) {}
}
abstract 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 virtual;
}
abstract contract C6 {
function abstractFunc() public virtual;
function abstractFunc2() public virtual;
}
abstract contract C7 {
function abstractFunc3() public virtual;
}
contract C8 is C5, C6, C7 {
function abstractFunc() public virtual override(C5, C6) {}
function abstractFunc2() public virtual override(C6) {}
function abstractFunc3() public virtual override {}
}
function freeFunc() {}