Adding a typed array to an empty untyped array using addAll implicitly fixes the type of the previously untyped array to match that of the added array. As a result, no elements of other types can be added afterward.
The error is reported on the add...