cheptsov / AdvancedExpressionFolding

https://plugins.jetbrains.com/plugin/9320?pr=idea
140 stars 30 forks source link

addAll() is folded wrongly when index is used #119

Open sabi0 opened 6 years ago

sabi0 commented 6 years ago

image

In this particular case (when index = 0) the best folding is probably this: vCharSequence = sequence + vCharSequence;

In case the index is different from 0 I don't think it can be folded without loosing semantics. Unless you are willing to bother with slices like: vCharSequence = vCharSequence[:3] + sequence + vCharSequence[3:]