xCode 8.0 Migrator and Swift 3.0 compiler issues

I went through migrating my projects to xCode 3.0 (Two huge projects). One of them ended up crashing swift compiler and the other project couldn't compile as well after migration. Went over this with Swift compiler team (Doug) and Migrator team at WWDC 16.


using optional chaining in switch statement causes app to crash.


I have filed radar for this issue

26878202


Also, there are bunch of other bugs that i have filed radar

isKindOfClass will not be migrated correctly

NSURLSession delegate methods such as didReceiveData will not migrate correctly

UICollectionView delegate method didSelectItemAtIndexPath will not migrate correctly

There is one more compiler segmentation fault bug that i will log later.


The bug report numbers are as follows.

26878014

26878005

26877977

26878351


@Doug, please see the bug numbers above. Thanks for your help during WWDC. I will log a separate bugs for the compiler crash and workaround bug.

Replies

I meant to say having optional chaining in switch statement causes the compiler to crash (not the app)

I got a few times a segmentation fault 11 because of for loops, in Swift 2.2. If that may help.


Here is the pattern :


I initialize n with :

let n = a?.anInt


then calling

for i in 0..<n {


causes the segmentation fault

isKindOfClass(_

aClass
: NSObject) -> Bool

is now

isKind(

of
: AnyClass.self) -> Bool


E.g.,

if self.isKind(of: MyClass.self) {

,,,

}


It doesn't work without the "self" postfix.