Upon extending a module, I have encountered an issue related to declaring private properties. Specifically, when I attempt to declare a method like init()
as private, an error message is generated:
Types have separate declarations of a private property 'init'
It seems that the problem arises from having the same method in the superclass. However, I find it inconvenient to have to use different names just because the method is already taken in a class that is inaccessible to me due to its private nature!
My intention in declaring the method as private was to prevent such conflicts. I don't want to override it, but I also don't see why this should restrict me from declaring it in other classes. What purpose does this restriction serve anyway?