Open keith opened 6 years ago
@nkcsgexi, did you have a bug for this already?
Unfortunately, migrator currently has no comprehensive static analysis capability to simplify this migration pattern.
The requested optimization is beyond the current static analysis capability of migrator.
Well, isn't that why a bug was filed?
this bug is a totally reasonable request. We resolved it because it's hard for migrator to fix it at this point 🙂
But it's not resolved - why not leave the bug open as an indication that it's something the migrator should be able to handle?
@tonyarnold sounds good! let's re-open it on migrator for future reference.
Attachment: Download
Environment
Xcode 10.0 beta 2 (10L177m)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Source Tooling | |Labels | Bug, Migrator | |Assignee | @nkcsgexi | |Priority | Medium | md5: 894c9c2b831afe650601702c7593f5c9Issue Description:
When you migrate this Swift 4.1 code:
You end up with this 4.2 code:
The original code compiles correctly with Swift 4.2. Migrate the attached project for an example. This is similar to https://bugs.swift.org/browse/SR-8057