solidity/test/libsolidity/semanticTests/receive/empty_calldata_calls_receive.sol
2022-05-19 20:23:28 +02:00

16 lines
256 B
Solidity

contract A {
uint public x;
receive () external payable { ++x; }
}
// ====
// compileToEwasm: also
// ----
// x() -> 0
// ()
// x() -> 1
// (), 1 wei
// x() -> 2
// x(), 1 wei -> FAILURE
// (): hex"00" -> FAILURE
// (), 1 ether: hex"00" -> FAILURE