You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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; // passaddress adr2 =0xde74fE3E9482D11dAeBE981C1f5Bf1e5E3055c3; // failuint256 a =0xde74fE3E9482D11dAeBE981C1f5Bf1e5E3055c3; // failuint256 b =0xde74fE3E9482D11dAeBE981C1f5Bf1e5E3055c; // pass
}
The text was updated successfully, but these errors were encountered:
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
Steps to Reproduce
Below is the reproducible test program:
The text was updated successfully, but these errors were encountered: