mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
22 lines
396 B
Solidity
22 lines
396 B
Solidity
contract C {
|
|
uint public x = msg.value - 10;
|
|
constructor() payable {}
|
|
}
|
|
|
|
contract D {
|
|
function f() public {
|
|
unchecked {
|
|
new C();
|
|
}
|
|
}
|
|
function g() public payable returns (uint) {
|
|
return (new C{value: 11}()).x();
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// ----
|
|
// f() -> FAILURE, hex"4e487b71", 0x11
|
|
// g(), 100 wei -> 1
|
|
// gas legacy: 101790
|