solidity/test/libsolidity/semanticTests/various/senders_balance.sol

23 lines
330 B
Solidity
Raw Normal View History

contract C {
function f() public view returns (uint256) {
return msg.sender.balance;
}
}
contract D {
C c = new C();
2020-06-23 12:14:24 +00:00
constructor() payable {}
function f() public view returns (uint256) {
return c.f();
}
}
// ====
// compileViaYul: also
// ----
// constructor(), 27 wei ->
// f() -> 27