Don't understand "Extra argument 'repeatedValue' in call"

115 Views Asked by At

What could be wrong with:

let myArray = [UInt](count: 256, repeatedValue: 0)

that leads to the error Extra argument 'repeatedValue' in call?

I found this in existing code I'm adding to my Swift 5 app.

1

There are 1 best solutions below

0
Sulthan On BEST ANSWER

This is not Swift 5. The initializer name is init(repeating:count:) since Swift 3.