Re: Swift Generics Error When Enforcing Protocol Conformance...
Re: Swift Generics Error When Enforcing Protocol Conformance...
- Subject: Re: Swift Generics Error When Enforcing Protocol Conformance...
- From: Quincey Morris <email@hidden>
- Date: Thu, 24 Dec 2015 09:28:39 -0800
- Feedback-id: 167118m:167118agrif8a:167118sR49F_ORPD:SMTPCORP
On Dec 24, 2015, at 04:55 , Peters, Brandon <email@hidden> wrote:
>
> I am using Xcode 7.2. What version of Xcode are you running? Unless I am missing something, the version you typed into playground is not working for me in code editor when I press run.
Also 7.2. Here is exactly what I have in the playground, and it correctly shows the result as nil:
> func linconv<T: FloatingPointType>(signal_A signal_A: [T], signal_B: [T]) -> [T]? {
>
> var arr = [T](count: 4, repeatedValue: T(0))
>
> return nil
> }
>
> func linconv<T: IntegerType>(signal_A signal_A: [T], signal_B: [T]) -> [T]? {
>
> var arr = [T](count: 4, repeatedValue: 0)
>
> return nil
> }
>
> linconv (signal_A: [10.0], signal_B: [20.0])
_______________________________________________
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