solidity/test/libsolidity/syntaxTests/types/address/address_in_struct_fail.sol

12 lines
243 B
Solidity
Raw Normal View History

contract A {
struct S {
address payable a;
}
S s;
function f() public {
s.a = address(this);
}
}
// ----
// TypeError: (110-123): Type address is not implicitly convertible to expected type address payable.