> On Apr 18, 2016, at 7:23 AM, zh ao via swift-users <swift-users@swift.org> > wrote: > > I do think there is something wrong here. > > // Xcode 7.3.1, Swift 2.2 > > let t1: Int? = 2 // struct Int? > let y = t1 ?? "abcdf" // error > let x = t1 ?? NSFont(name: "", size: 0) // x: NSObject? > > for x, how could it be NSObject?, as t1 is a struct? > > zhaoxin
My guess would be NSNumber. Strings can bridge to NSString (struct to class), enums of ErrorType to NSError (enum to class), etc. -- E
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users