solc-typed-ast icon indicating copy to clipboard operation
solc-typed-ast copied to clipboard

isHex field on StringLiteralType broken for solidity <0.5.0

Open d1m0 opened this issue 4 weeks ago • 0 comments

For solidity <0.5.0 hex strings have just a string kind. So isHex is erroneously false.

We can fix this in InferType by having a special case for StringLiterals with versions <0.5.0 where the .value == null && .hexValue !== null

d1m0 avatar Nov 05 '25 16:11 d1m0