AdvancedExpressionFolding icon indicating copy to clipboard operation
AdvancedExpressionFolding copied to clipboard

Folding range checks into "in [...]" loses closing bracket sometimes

Open sabi0 opened this issue 8 years ago • 3 comments

image

sabi0 avatar Jan 19 '18 14:01 sabi0

And sometimes an extra bracket is left: image

mhdhejazi avatar Dec 30 '18 16:12 mhdhejazi

And sometimes an extra bracket is left: image

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]

ciscorucinski avatar Dec 30 '18 16:12 ciscorucinski

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.

mhdhejazi avatar Dec 31 '18 07:12 mhdhejazi