Open
Description
Description
As described in Address Literals, hex literals of the correct size that pass the checksum test are of address type.
An incorrect size of 38 can be converted to uint256, but a correct size of 39 that fail the checksum cannot be converted to uint256, which is confusing.
Environment
- Compiler version: 0.8.28
- Operating system: macos
Steps to Reproduce
Below is the reproducible test program:
function f() {
address adr = 0xde74fE3E9482D11dAeBE981C1f5Bf1e5E3055c31; // pass
address adr2 = 0xde74fE3E9482D11dAeBE981C1f5Bf1e5E3055c3; // fail
uint256 a = 0xde74fE3E9482D11dAeBE981C1f5Bf1e5E3055c3; // fail
uint256 b = 0xde74fE3E9482D11dAeBE981C1f5Bf1e5E3055c; // pass
}