Open
Description
Previous ID | SR-5942 |
Radar | None |
Original Reporter | @josephlord |
Type | Bug |
Attachment: Download
Environment
Xcode 9 release version. Migrating to minimise inference.
Additional Detail from JIRA
Votes | 0 |
Component/s | Source Tooling |
Labels | Bug, Migrator |
Assignee | None |
Priority | Medium |
md5: 04fdc704cbc442bbb5b67683a60b912f
Issue Description:
The Swift 4 migrator is handling ternary operations that need to be wrapped in a constructor now (and didn't before) quite oddly.
`tableToViewTopConstraint?.priority = isShowingServerUpdating ? 1 : 999`
Should convert to:
`
tableToViewTopConstraint?.priority = UILayoutPriority.RawValue(isShowingServerUpdating ? 1 : 999)
`
But actually converted to:
`tableToViewTopConstraint?.priority = UILayoutPriority(rawValue: UILayoutPriority.RawValue(isShowingServerUpdating ? 1 : 999))`