integration: add function return type test (#244)

Closes #236
This commit is contained in:
xermicus
2025-02-27 10:37:37 +01:00
committed by GitHub
parent ee064671e0
commit 84deb3a29d
2 changed files with 37 additions and 0 deletions
@@ -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;
}
}
+1
View File
@@ -56,6 +56,7 @@ test_spec!(transfer, "Transfer", "Transfer.sol");
test_spec!(send, "Send", "Send.sol");
test_spec!(function_pointer, "FunctionPointer", "FunctionPointer.sol");
test_spec!(mload, "MLoad", "MLoad.sol");
test_spec!(function_type, "FunctionType", "FunctionType.sol");
fn instantiate(path: &str, contract: &str) -> Vec<SpecsAction> {
vec![Instantiate {