[Rust] Get type of expression
Open
question
Rust
- Dominant language
- CodeQL
- Stars
- 10.1k
- Forks
- 2.1k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 141
Description
**Description of the issue**
How do I get the type of an expression in Rust?
For example, I want to constrain this to only accesses on string-like expressions.
```ql
private class IndexExprOnNonConstantString extends IndexExpr {
IndexExprOnNonConstantString() { not this.getBase() instanceof StringLiteralExpr }
}
```
**Actual**: No `getType` predicate on expr.
**Expected**: Predicate to get type of expr.
When will support be added for an - in my understanding - very basic feature?
Or is there a workaround/internal API?
Contributor guide
Assessment
This issue has not been assessed yet.