mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
21 lines
306 B
Solidity
21 lines
306 B
Solidity
contract C {
|
|
function f() public view returns (uint256) {
|
|
return msg.sender.balance;
|
|
}
|
|
}
|
|
|
|
|
|
contract D {
|
|
C c = new C();
|
|
|
|
constructor() public payable {}
|
|
|
|
function f() public view returns (uint256) {
|
|
return c.f();
|
|
}
|
|
}
|
|
|
|
// ----
|
|
// constructor(), 27 wei ->
|
|
// f() -> 27
|