AdvancedExpressionFolding
AdvancedExpressionFolding copied to clipboard
Folding range checks into "in [...]" loses closing bracket sometimes

And sometimes an extra bracket is left:

And sometimes an extra bracket is left:
This code if perfectly fine. [0, 10) means include zero up to ten (but don't include ten)
if you change i < entryCount to i <= entryCount, then your code will be folded to...
for val i : [0, entryCount]
This code if perfectly fine.
[0, 10)means include zero up to ten (but don't include ten)
Yes, you are right. Pardon my ignorance.