feature: add support for signaling that an expression can be wrapped into a method call
Open
feature
- Dominant language
- Java
- Stars
- 2k
- Forks
- 392
- Avg merge
- 11h 24m
- Merged PRs (30d)
- 36
Description
(from @oscarlvp)
`x = i` can be transformed into `x=f(i)`.
`i++` cannot be transformed into `f(i)++`.
In CtUnaryOperator, `getOperand()` has a generic role `EXPRESSION` and getRole() cannot be used for checking that an expression can be wrapped into a method call
The solution is not obvious.
* changing the role of `getOperand()` from EXPRESSION to ASSIGNED. But this does not work for all CtUnaryOperator
* adding a method in CtUnaryOperator which only consider the assignent-style unary operators.
Contributor guide
Assessment
This issue has not been assessed yet.