Fix missing parentheses around unwrapped optional expression if an indexer is used

Description

REFormattedNumberField test project:

converts to:

.. but should be at least (still not compilable, but better):

Environment

None

Activity

Show:
Alex Petuschak
August 10, 2017, 3:36 PM
Edited

+Parentheses around URL constructor in ShouldApplyMessageNameRefactoring() test should be removed.

Alex Petuschak
October 20, 2017, 11:30 AM
Edited

Related: ShouldNotCastIndexedExpressionToArrayType() test.

This unwrapping should not occur.

Alex Petuschak
March 28, 2018, 3:25 PM
Edited

Related: ShouldConvertUnsignedLongLongIntegerSuffix test.
`(1 * Double(NSEC_PER_SEC)) / 10`
should be:
`1 * Double(NSEC_PER_SEC) / 10`.

Update: I don’t see any reason for this change.

Our approach is to keep original parentheses for most cases, rather than optimize the code and remove parentheses (which may be very error-prone).

Alex Petuschak
June 16, 2020, 3:36 PM

Closing as the original issue is no longer reproducible.

Current output:

Possible improvement for later: .

Assignee

Alex Petuschak

Reporter

Alex Petuschak

Labels

None

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

Medium
Configure