'Bool' is not convertible to 'BooleanLiteralConvertible'
'Bool' is not convertible to 'BooleanLiteralConvertible'
- Subject: 'Bool' is not convertible to 'BooleanLiteralConvertible'
- From: Rick Mann <email@hidden>
- Date: Mon, 27 Jul 2015 14:57:44 -0700
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@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden