ich offiziell bin verwirrt, warum dies nicht funktioniert (es gibt nicht viel, hier zu erklären):Swift 2.2: kann nicht Wert vom Typ umwandeln ‚[B]‘ zu bestimmtem Typ ‚[A]‘
protocol A {
var value: Int { get set }
}
struct B: A {
var value: Int
}
let array: [B] = [B(value: 10)]
let singleAValue: A = array[0] // extracting works as expected
var protocolArray: [A] = []
protocolArray.append(singleAValue) // we can put the value inside the `protocolArray` without problems
print(protocolArray)
let newProtocolArray: [A] = array // but why does this conversion not work?