Missing parentheses around `for` range expressions

Description

See ShouldAddParenthesesToForRangeExpression2 test.

Until we have changed commonType to an integer type here: https://take.ms/Fj34e

the test output was missing parentheses around the right bound of the range expression:

I’ve tried fixing this by adding parentheses to the expression in CastToContextType()

.. but this led to many broken unit tests.

Environment

None

Assignee

Alex Petuschak

Reporter

Alex Petuschak

Labels

None

Git Branch Name

GitHub Issue

None

Components

Fix versions

Priority

Medium
Configure