• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 'Bool' is not convertible to 'BooleanLiteralConvertible'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'Bool' is not convertible to 'BooleanLiteralConvertible'


  • Subject: Re: 'Bool' is not convertible to 'BooleanLiteralConvertible'
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 27 Jul 2015 22:18:23 +0000

On Jul 27, 2015, at 15:08 , Rick Mann <email@hidden> wrote:
>
> Is it bridged automatically anywhere else? Seems like a lot of ad-hoc and inconsistent support for bridging.

I dunno, really. Support for CF things (and C things and unmanaged pointers) seems to vary release by release, so I don’t try to keep up.

Bridging is consistent, though, I believe. It’s very specific:

	Int,etc <-> NSNumber
	String <-> NSString
	[AnyObject] <-> NSArray
	[NSObject: AnyObject] <-> NSDictionary

But this doesn’t extend to things we know about Obj-C and Cocoa externally to Swift, or internally about the implementations (such as toll-free bridging between CF and NS types). Remember, too, that we had to cast CFString variables like kSecReturnData to NSString manually in Obj-C to shut the compiler up.

P.S. In my earlier example, ‘as String’ seems to work as well as ‘as NSString’. I presume that’s because of bridging, once you’ve got as far as NSString.

_______________________________________________

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


References: 
 >'Bool' is not convertible to 'BooleanLiteralConvertible' (From: Rick Mann <email@hidden>)
 >Re: 'Bool' is not convertible to 'BooleanLiteralConvertible' (From: Quincey Morris <email@hidden>)
 >Re: 'Bool' is not convertible to 'BooleanLiteralConvertible' (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: 'Bool' is not convertible to 'BooleanLiteralConvertible'
  • Next by Date: Re: 'Bool' is not convertible to 'BooleanLiteralConvertible'
  • Previous by thread: Re: 'Bool' is not convertible to 'BooleanLiteralConvertible'
  • Next by thread: Re: 'Bool' is not convertible to 'BooleanLiteralConvertible'
  • Index(es):
    • Date
    • Thread