Swift 3.0 migrator code inside invalid #if isn't migrated

Number:rdar://26886830 Date Originated:19-Jun-2016 23:22
Status:Works as intended Resolved:
Product:Developer Tools Product Version:Xcode 8 beta 1
Classification:Other Bug Reproducible:Always
When migrating our codebase from Swift 2.2 -> Swift 3.0 we noticed that code we had inside a `#if DEBUG` was not migrated.

Steps to Reproduce:
1. Add some code inside an `#if DEBUG`
2. Migrate the project

Expected Results:
The code inside the `#if` is migrated.

Actual Results:
The code around it is migrated, but not the code inside it.

Xcode 8 beta 1

This may be expected since it would be hard to guess whether or not that code could compile. It would possibly be nice if we could define the flags used during migration, since in this specific example everything inside `#if DEBUG` would definitely compile.


The fix here is to migrate a scheme with the appropriate flags

By keithbsmiley at July 6, 2016, 6:12 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!