solc-typed-ast
solc-typed-ast copied to clipboard
isHex field on StringLiteralType broken for solidity <0.5.0
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