import CommonCrypto protocol Foo { associatedtype Context var context: Context { get set } var bar: (UnsafeMutablePointer<Context>!, UnsafeRawPointer!, CC_LONG) -> Int32 { get } }
struct SHA1: Foo { var context: CC_SHA1_CTX var bar: (UnsafeMutablePointer<CC_SHA1_CTX>!, UnsafeRawPointer!, CC_LONG) -> Int32 = CC_SHA1_Update } Unfortunately this will not compile any longer with Swift 3.0. The error is: Implicitly unwrapped optionals are only allowed at top level and as function results. I can try modifying `bar` definition to be `?` instead of `!` but then `CC_SHA1_Update`) can no longer be assigned to `bar`. Suggestions? _______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users