In the following code,

    import Foundation

    let d1 = [ kSecReturnData : true ]
    let d2 = [ kSecReturnData : Bool(booleanLiteral: true) ]
    let d3 = [ kSecReturnData as String : Bool(booleanLiteral: true) ]
    let d4 : [NSObject:AnyObject] = [ kSecReturnData : true ]

error: 'Bool' is not convertible to 'BooleanLiteralConvertible'
    let d1 = [ kSecReturnData : true ]
                                ^~~~
error: '_' is not convertible to 'CFString'
    let d2 = [ kSecReturnData : Bool(booleanLiteral: true) ]
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Looking at the declaration for BooleanLiteralConvertible, that seems to be the 
only thing it would support.

What does the second one even mean?

And is d3 or d4 really the way to do this?

TIA,

-- 
Rick Mann
[email protected]



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to