mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7157 from ethereum/fix-7155
FunctionType: Return correct stacksize for transfer/send
This commit is contained in:
commit
6730a59f74
@ -2837,6 +2837,8 @@ unsigned FunctionType::sizeOnStack() const
|
|||||||
case Kind::ArrayPush:
|
case Kind::ArrayPush:
|
||||||
case Kind::ArrayPop:
|
case Kind::ArrayPop:
|
||||||
case Kind::ByteArrayPush:
|
case Kind::ByteArrayPush:
|
||||||
|
case Kind::Transfer:
|
||||||
|
case Kind::Send:
|
||||||
size = 1;
|
size = 1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
contract TransferTest {
|
||||||
|
function() external payable {
|
||||||
|
// This used to cause an ICE
|
||||||
|
address(this).transfer;
|
||||||
|
}
|
||||||
|
|
||||||
|
function f() pure public {}
|
||||||
|
}
|
||||||
|
// ====
|
||||||
|
// compileViaYul: also
|
||||||
|
// ----
|
||||||
|
// f() ->
|
Loading…
Reference in New Issue
Block a user