In Swift, I notice that I can upcast an object that conforms to a protocol called, let\'s say SubProtocol to another protocol called SuperProtocol
SubProtocol
SuperProtocol
Try this code - just checked, works fine
let array2: [SuperProtocol] = array1.map { $0 as SuperProtocol }