Unicode literals implicitly converting to fixed size byte arrays cause incorrect error
Drblessing opened this issue ยท 4 comments
Drblessing commented
The contract:
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.18.0;
contract StringFun {
function funnyString() public pure returns (bytes10 test) {
test = unicode"Hello ๐";
}
}
compiles and is runnable. You can test this on remix.
However, solhint throws an error:
test.sol:6:22: Error: Parse error: extraneous input '"Hello ๐"' expecting ';'
fvictorio commented
@Drblessing I can't reproduce this, are you sure you're using the latest version of solhint?
Drblessing commented
Oh, thanks for the tip, probably not, I'm using a fresh remix environment and the Solhint plugin, and I'm able to reproduce it. Sorry, I can't find a version number on remix. Should I close this?
fvictorio commented
Yeah, I'd say it's probably the Remix plugin using an outdated version. I'm not sure what's the right repo to report that though. Thanks for clarifying!
Drblessing commented
Thanks for the help!