solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/541_warn_about_address_members_on_contract_balance.sol

8 lines
253 B
Solidity
Raw Normal View History

contract C {
function f() view public {
this.balance;
}
}
// ----
2018-07-17 12:31:21 +00:00
// TypeError: (52-64): Member "balance" not found or not visible after argument-dependent lookup in contract C. Use "address(this).balance" to access this address member.