aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/nameAndTypeResolution/466_does_not_error_transfer_payable_fallback.sol
blob: 2b7f8daed2e0353054006fcb7c0ca1c6b77383b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This used to be a test for a.transfer to generate a warning
// because A does not have a payable fallback function.

contract A {
    function() payable external {}
}

contract B {
    A a;

    function() external {
        a.transfer(100);
    }
}
// ----
// Warning: (228-238): Using contract member "transfer" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, for example use "address(contract).transfer" instead.