-
Notifications
You must be signed in to change notification settings - Fork 981
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
[Bug]: Missing quotes in case mapping key passed as a string #2538
Comments
Seems like a quote isn't being escaped. What are you trying to accomplish? There's probably a better way to do it than comparing the expression (which just casts the AST expression with slither/slither/core/source_mapping/source_mapping.py Lines 72 to 82 in aeeb2d3
|
You are right. In these specific cases, it is possible to use
In this case, the expression is treated as a |
Describe the issue:
We are using Slither Python API to analyze the expression of each node of function in a contract within Slither object.
The issue I need help with is that Slither expression does not differentiate between the following cases (in Solidity):
mapping(string => uint256) stringGeneBuckets;
For both cases mentioned above, the node.expression returned is
stringGeneBuckets[myvariable] = _geneId
, in the first case shouldn't it bestringGeneBuckets["myvariable"] = _geneId
?Code example to reproduce the issue:
pragma solidity ^0.8.0;
contract GeneMapping {
}
Version:
0.9.6
Relevant log output:
No response
The text was updated successfully, but these errors were encountered: