Re: Bindings in Swift
Re: Bindings in Swift
- Subject: Re: Bindings in Swift
- From: Quincey Morris <email@hidden>
- Date: Mon, 11 Aug 2014 16:34:30 -0700
On Aug 11, 2014, at 16:14 , Greg Parker <email@hidden> wrote:
> Do you have an example?
For example (beta 5), enter some source that uses type “Array”, then command-click on “Array”. (I don’t know how to get Xcode to display the resulting file directly, so I’ve been using this technique. I don’t know if the result is real or synthetic.)
Look for the 2nd “extension Array”, and the 2nd constructor in this extension:
init<S : SequenceType where T == T>(_ s: S)
or look at ‘extend’ or look at ‘join’.
Incidentally, I had other issues when trying to use things declared in this file. For example, if I try to define a class that conforms to “Collection”, the compiler says “‘Collection' is ambiguous for type lookup in this context”.
(What I was trying to do was define a new class that had the same interface as an Array, but had only the immutable parts of the interface as its public API.)
_______________________________________________
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