Quincey,

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.

On Dec 24, 2015, at 1:20 AM, Quincey Morris 
<[email protected]<mailto:[email protected]>>
 wrote:

On Dec 23, 2015, at 22:08 , Peters, Brandon 
<[email protected]<mailto:[email protected]>> wrote:

func linconv<T: FloatingPointType>(signal_A signal_A: [T], signal_B: [T]) -> 
[T]? {

   var arr = [T](count: 4, repeatedValue: 0.0)

   return nil
}

This works in a playground:

func linconv<T: FloatingPointType>(signal_A signal_A: [T], signal_B: [T]) -> 
[T]? {

var arr = [T](count: 4, repeatedValue: T (0))

return nil
}

The point being that 0.0 isn’t necessarily convertible to an arbitrary 
FloatingPointType, but any FloatingPointType you’re likely to use will have a 
conversion init from an Int literal.



_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to