I was surprised when I got a compiler error for this code:

if try? MyThrowingFunction() != nil {…}     (MyThrowingFunction does not return 
an optional value)

This compiles:

if (try? MyThrowingFunction) != nil {…}     (Xcode 7.3.1)

Shouldn’t try? have higher priority than != here?

Please disregard if this is changed in Swift 3

Jan E.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users

Reply via email to