solidity/test/libsolidity/syntaxTests/types/address_members_in_contract.sol

7 lines
313 B
Solidity
Raw Normal View History

2018-07-18 17:51:24 +00:00
contract C {
function f() public returns (C) { return this; }
function g() public returns (uint) { return f().balance(); }
}
// ----
// TypeError: (114-125): Member "balance" not found or not visible after argument-dependent lookup in contract C. Use "address(...).balance" to access this address member.