mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #12954 from aathan/clarify-address-literals-eip-55
Link to address literals from address value types
This commit is contained in:
		
						commit
						9dd2e0ec3f
					
				@ -210,6 +210,11 @@ an exception to this rule.
 | 
				
			|||||||
    declare its type as ``address payable`` to make this requirement visible. Also,
 | 
					    declare its type as ``address payable`` to make this requirement visible. Also,
 | 
				
			||||||
    try to make this distinction or conversion as early as possible.
 | 
					    try to make this distinction or conversion as early as possible.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    The distinction between ``address`` and ``address payable`` was introduced with version 0.5.0.
 | 
				
			||||||
 | 
					    Also starting from that version, contracts are not implicitly convertible to the ``address`` type, but can still be explicitly converted to
 | 
				
			||||||
 | 
					    ``address`` or to ``address payable``, if they have a receive or payable fallback function.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Operators:
 | 
					Operators:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* ``<=``, ``<``, ``==``, ``!=``, ``>=`` and ``>``
 | 
					* ``<=``, ``<``, ``==``, ``!=``, ``>=`` and ``>``
 | 
				
			||||||
@ -223,9 +228,7 @@ Operators:
 | 
				
			|||||||
    or you can use ``address(uint160(uint256(b)))``, which results in ``0x777788889999AaAAbBbbCcccddDdeeeEfFFfCcCc``.
 | 
					    or you can use ``address(uint160(uint256(b)))``, which results in ``0x777788889999AaAAbBbbCcccddDdeeeEfFFfCcCc``.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. note::
 | 
					.. note::
 | 
				
			||||||
    The distinction between ``address`` and ``address payable`` was introduced with version 0.5.0.
 | 
					    Mixed-case hexadecimal numbers conforming to `EIP-55 <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md>`_ are automatically treated as literals of the ``address`` type. See :ref:`Address Literals<address_literals>`.
 | 
				
			||||||
    Also starting from that version, contracts do not derive from the address type, but can still be explicitly converted to
 | 
					 | 
				
			||||||
    ``address`` or to ``address payable``, if they have a receive or payable fallback function.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. _members-of-addresses:
 | 
					.. _members-of-addresses:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user