Sweet! That does totally work. Why did it compile if it's an incomplete type? Shouldn't that be something that you catch at compile time in a type-safe language?
I'm always hesitant about type inference in Swift because you have a 50-50 chance of the compiler not understanding at all and complaining about $T89 intermediate types not equating to Float. And that's if your line isn't 81 characters long (i.e. longer than an arbitrary amount) and too confusing for the compiler all together, in which case you should "consider breaking up the expression". I appreciate the quick help. =D -- Daniel Blakemore Pixio Software On Thu, Dec 11, 2014 at 4:59 PM, Marco S Hyman <m...@snafu.org> wrote: > On Dec 11, 2014, at 3:24 PM, Daniel Blakemore <dblakem...@pixio.com> > 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 (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com