Re: Swift Array with Struct Members (Compiler Bug?)
Re: Swift Array with Struct Members (Compiler Bug?)
- Subject: Re: Swift Array with Struct Members (Compiler Bug?)
- From: Marco S Hyman <email@hidden>
- Date: Thu, 11 Dec 2014 15:59:14 -0800
On Dec 11, 2014, at 3:24 PM, Daniel Blakemore <email@hidden> wrote:
>
> If I do this, however, it breaks:
> var arr2 = [Array](count:6, repeatedValue:[Color](count:8, repeatedValue:
> Color()))
[Array] is syntactic sugar for Array<Array>. It is not a complete type.
It is an array of arrays of ????
Let the type inference work for you. Try it this way and see if it generates
what you desire.
var arr2 = Array(count:6, repeatedValue:Array(count:8, repeatedValue:Color()))
Marc
_______________________________________________
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