Re: Value of type '[AnyObject]!' has no member 'Generator'
Re: Value of type '[AnyObject]!' has no member 'Generator'
- Subject: Re: Value of type '[AnyObject]!' has no member 'Generator'
- From: Quincey Morris <email@hidden>
- Date: Sun, 04 Oct 2015 09:51:39 -0700
- Feedback-id: 167118m:167118agrif8a:167118sK6xZXcRN5:SMTPCORP
On Oct 4, 2015, at 05:10 , Roland King <email@hidden> wrote:
>
> Quincey sharpens his keyboard
No, the only person who’d get hurt is me.
There are actually several strange things going on here in the AVCaptureDevice API, and they look like bugs to me:
— ‘devices’ and ‘formats’ are documented to return arrays. There’s nothing about a nil return, so I don’t understand why they’re bridged into Swift '[…]!’ types, since *surely* they return an empty array if there aren’t any devices or formats, and there’s no error return. Maybe just a missing nullability annotation.
— ‘devices’ and ‘formats’ are documented to return arrays of ‘AVCaptureDevice’ and AVCaptureDeviceFormat’ respectively. They should be bridged to arrays of the correct types. Again maybe a missing NSArray generic annotation?
— Command-clicking on ‘formats’ really should display the generated Swift header, but it displays the Obj-C header instead. We seen this before recently. It looks like Swift sometimes gets confused over Obj-C properties, but it’s odd that something so fundamental would be broken.
_______________________________________________
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