mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
159f50e189
These were marked IR-only, but they do pass on the old codegen too. Also add old codegen version of semantictests/revertStrings/function_entry_checks.
27 lines
586 B
Solidity
27 lines
586 B
Solidity
contract C {
|
|
function internal_func() internal pure returns (int8)
|
|
{
|
|
return 1;
|
|
}
|
|
function call_internal_func() public pure returns (bool ret)
|
|
{
|
|
function() internal pure returns(int8) func = internal_func;
|
|
|
|
return func() == internal_func();
|
|
}
|
|
function call_deleted_internal_func() public pure returns (bool ret)
|
|
{
|
|
function() internal pure returns(int8) func = internal_func;
|
|
|
|
delete func;
|
|
|
|
return func() == internal_func();
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// compileToEwasm: also
|
|
// ----
|
|
// call_deleted_internal_func() -> FAILURE
|
|
// call_internal_func() -> true
|