Merge pull request #7157 from ethereum/fix-7155

FunctionType: Return correct stacksize for transfer/send
This commit is contained in:
chriseth
2019-08-01 14:40:35 +02:00
committed by GitHub
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -2837,6 +2837,8 @@ unsigned FunctionType::sizeOnStack() const
case Kind::ArrayPush:
case Kind::ArrayPop:
case Kind::ByteArrayPush:
case Kind::Transfer:
case Kind::Send:
size = 1;
break;
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() ->