mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
18 lines
403 B
Solidity
18 lines
403 B
Solidity
contract C {
|
|
modifier tryCircumvent {
|
|
if (false) _; // avoid the function, we should still not accept ether
|
|
}
|
|
function f() tryCircumvent public returns (uint) {
|
|
return msgvalue();
|
|
}
|
|
function msgvalue() internal returns (uint) {
|
|
return msg.value;
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// compileToEwasm: also
|
|
// ----
|
|
// f(), 27 wei -> FAILURE
|
|
// balance -> 0
|