solidity/test/libsolidity/semanticTests/arithmetics/check_var_init.sol
ssi91 e7165f3a9c pass a literal with correct length
mark a test as Yul-based
2020-11-27 04:02:48 +07:00

21 lines
374 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