mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
17 lines
279 B
Solidity
17 lines
279 B
Solidity
contract A {
|
|
uint public x;
|
|
receive () external payable { ++x; }
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// compileToEwasm: also
|
|
// ----
|
|
// x() -> 0
|
|
// ()
|
|
// x() -> 1
|
|
// (), 1 wei
|
|
// x() -> 2
|
|
// x(), 1 wei -> FAILURE
|
|
// (): hex"00" -> FAILURE
|
|
// (), 1 ether: hex"00" -> FAILURE
|