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

Underscores in integer literals are not supported #262

Open
KaiRo-at opened this issue Apr 24, 2019 · 1 comment
Open

Underscores in integer literals are not supported #262

KaiRo-at opened this issue Apr 24, 2019 · 1 comment
Labels

Comments

@KaiRo-at
Copy link

Description
When underscores are used in integer literals as described in https://solidity.readthedocs.io/en/develop/types.html#rational-and-integer-literals to increase readability, the linter wrongly reports a syntax error:
30:19 error Syntax error: unexpected token _

Steps to reproduce

Put code like the following into your contract and run ethlint on it:

total = 50_000_000 * (uint256(10) ** decimals());

Expected behavior
ethlint should accept and correctly interpret this syntax.

Operating System
Linux

Linter version
Solium version 1.2.4

Comments
As a linter should help improve code readability among other things, and this is a readability feature, it would be nice if both work together. :)

Priority
Low as it's easy to temporarily work around.

@KaiRo-at KaiRo-at added the bug label Apr 24, 2019
@duaraghav8
Copy link
Owner

This is a bug in Ethlint's internal solidity parser. I'll ship the fix in the next release
Thanks for reporting

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

No branches or pull requests

2 participants