Silly beginner Swift question: I am expecting the following 3 lines of code to work in the playground:
let items = ["Apple", "Orange", "Pear"]
items[1] = "Banana" // error here
items
Now the error
error: '@lvalue $T5' is not identical to 'String'
items[1] = "Banana"
My understanding that updating content of immutable array is possible in Swift. I use XCODE 6.1.1
Any idea what is going on here?
Thanks
Based on this thread this was possible in previous releases: Why in immutable array in swift value can be changed?