Problem
Override
a convenience initializer of a subclass and it produces a compile error.
Detail
I am
The reason override is unneeded:
Conversely, if you write a subclass initializer that matches a superclass convenience initializer, that superclass convenience initializer can never be called directly by your subclass, as per the rules described above in Initializer Chaining. Therefore, your subclass is not (strictly speaking) providing an override of the superclass initializer. As a result, you do not write the
override
modifier when providing a matching implementation of a superclass convenience initializer.
But as written, it seems it should work — as far as I can tell this is a compiler bug. If you change the name of the array
argument to ClassB's initializer to e.g. array2
, then it works as expected. You should file a Radar!