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

Unused variable: FPs due to expressions not considered #167

Closed
montyly opened this issue Feb 6, 2019 · 1 comment
Closed

Unused variable: FPs due to expressions not considered #167

montyly opened this issue Feb 6, 2019 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@montyly
Copy link
Member

montyly commented Feb 6, 2019

If a variable is used as the length of an array, it will not be considered as used

contract C {
  uint constant X = 100;
  uint[X] array;
  function f() external{
    array[0] = 1;
  }
}

We need to document all the places that can have an expression:

  • node.expression
  • variable.expression
  • length of an ArrayType
  • ?
@montyly montyly added the enhancement New feature or request label Feb 6, 2019
@montyly montyly added this to the 0.6.0 milestone Feb 6, 2019
@montyly
Copy link
Member Author

montyly commented Feb 8, 2019

Fixed in 0ad0777

@montyly montyly closed this as completed Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant