Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode literals implicitly converting to fixed size byte arrays cause incorrect error #410

Closed
Drblessing opened this issue Feb 20, 2023 · 4 comments

Comments

@Drblessing
Copy link

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
Copy link
Contributor

@Drblessing I can't reproduce this, are you sure you're using the latest version of solhint?

@Drblessing
Copy link
Author

Drblessing commented Feb 21, 2023

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
Copy link
Contributor

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!

@fvictorio fvictorio closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2023
@Drblessing
Copy link
Author

Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants