Eliminate redundant parentheses in metadata translations

Description

✔️ For example, see NSString.stringByAppendingString, stringByAppendingFormat methods.
These should add parentheses around the argument only if needed.

Environment

None

Activity

Show:
Alex Petuschak
September 5, 2017, 3:12 PM
Edited

✔️ See the following tests:

  • ShouldConvertUUIDInitializer

  • ShouldWrapStringByAppendingStringIntoParentheses

  • ShouldConvertNumberWithBoolToNumber

  • ShouldConvertNumberWithBoolWithVariable

  • ShouldConvertOptionalStringLengthToCount

  • ShouldUseBridgedCastingBetweenOptionalTypes

  • ShouldUseFunctionParameterTypeForMetadataLookup

Alex Petuschak
April 16, 2018, 3:57 PM
Edited

Related: FrameCruncher project / CaptureViewController.swift:

Alex Petuschak
June 8, 2018, 2:23 PM
Edited

✔️ Related:

is translated to

Update: current output:

Alex Petuschak
June 12, 2020, 2:38 PM
Edited

✔️ Related case: http://swiftify.me/5r8089

Assignee

Alex Petuschak

Reporter

Alex Petuschak

Labels

None

Git Branch Name

None

GitHub Issue

None

Components

Fix versions

Priority

High
Configure