2019-05-22 10:25:00 +00:00
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ====
|
2020-11-21 13:54:16 +00:00
|
|
|
// compileToEwasm: also
|
2021-03-12 23:02:36 +00:00
|
|
|
// compileViaYul: also
|
2019-05-22 10:25:00 +00:00
|
|
|
// ----
|
2020-10-13 11:28:39 +00:00
|
|
|
// call_deleted_internal_func() -> FAILURE, hex"4e487b71", 0x51
|
2019-05-22 10:25:00 +00:00
|
|
|
// call_internal_func() -> true
|