How do you add an object of a specific type to a generic Array:[Any]? My understanding is that Any should be able to contain any other object. Is this correct? Unfortunately I get an error message when I add specific objects to the generic array.
Example
An array of objects of type "SpecificItemType"
var results:[SpecificItemType] = []
... // adding various objects to this array
The generic target array for these objects
var matchedResults:[Any] = []
matchedResults += results
Error Message
[Any] is not identical to UInt8
What's the problem here? The error message didn't really help.
One more note: Interestingly it is possible to add single objects using append. so the following works
matchedResults.append(results.first)