title: Disable automatic convenience initializer inheritance in Swift
body: <p>I have a class (let's say <code>Foo</code>) which has two initializers, one of which is designated and the other is a <code>convenience init</code>. They look something like this:</p>
  
  <pre><code>public class Foo {
      init(object: SomeObject) {
          self.object = object
          // Do something with object…
      }
  
      public convenience init() {
          self.init(object: SomeObject())
      }
  }
  </code></pre>
  
  <p><code>Bar</code> is a subclass of <code>Foo</code>, and being more specialised it configures the <code>SomeObject()</code> instance before calling <code>Foo</code>'s designated initialiser</p>
  
  <pre><code>public class Bar {
      public convenience init(arg: Arg) {
          let object = SomeObject(arg: arg)
          // Configure object…
          self.init(object: object)
      }
  }
  </code></pre>
  
  <p>Unfortunately, since <code>Bar</code> meets all the conditions required for <a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Initialization.html#//apple_ref/doc/uid/TP40014097-CH18-ID222" rel="nofollow noreferrer">Automatic Initializer Inheritance</a>, it also inherits <code>Foo</code>'s <code>convenience</code> initialiser which does not expect any arguments. This does not make sense for <code>Bar</code>, since the special behaviour I mentioned before occurs in its <code>convenience init</code> method.</p>
  
  <p>Is there a way to disable Automatic Initializer Inheritance? If not, would it be possible to change the inherited <code>convenience init</code> to be <code>private</code>? If neither of these are possible, I'm also open to rethinking the class structure and doing it another way. In that case I can also provide more detail (such as what <code>Foo</code> and <code>Bar</code> are) if needed.</p>