mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-14 19:11:04 +00:00
@@ -0,0 +1,36 @@
|
|||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
pragma solidity ^0.8.28;
|
||||||
|
|
||||||
|
/* runner.json
|
||||||
|
{
|
||||||
|
"differential": true,
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"Instantiate": {
|
||||||
|
"code": {
|
||||||
|
"Solidity": {
|
||||||
|
"contract": "FunctionType"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Call": {
|
||||||
|
"dest": {
|
||||||
|
"Instantiated": 0
|
||||||
|
},
|
||||||
|
"data": "b8c9d365"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
contract FunctionType {
|
||||||
|
uint public immutable x = 42;
|
||||||
|
|
||||||
|
function h() public view returns (function() external view returns (uint)) {
|
||||||
|
return this.x;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -56,6 +56,7 @@ test_spec!(transfer, "Transfer", "Transfer.sol");
|
|||||||
test_spec!(send, "Send", "Send.sol");
|
test_spec!(send, "Send", "Send.sol");
|
||||||
test_spec!(function_pointer, "FunctionPointer", "FunctionPointer.sol");
|
test_spec!(function_pointer, "FunctionPointer", "FunctionPointer.sol");
|
||||||
test_spec!(mload, "MLoad", "MLoad.sol");
|
test_spec!(mload, "MLoad", "MLoad.sol");
|
||||||
|
test_spec!(function_type, "FunctionType", "FunctionType.sol");
|
||||||
|
|
||||||
fn instantiate(path: &str, contract: &str) -> Vec<SpecsAction> {
|
fn instantiate(path: &str, contract: &str) -> Vec<SpecsAction> {
|
||||||
vec![Instantiate {
|
vec![Instantiate {
|
||||||
|
|||||||
Reference in New Issue
Block a user