Why can’t Swift initializers call convenience initializers on their superclass?

This is Rule 1 of the “Initializer Chaining” rules as specified in the Swift Programming Guide, which reads:

Rule 1: Designated initializers must call a designated initializer from their
immediate superclass.

https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Initialization.html

Emphasis mine. Designated initializers cannot call convenience initializers.

There is a diagram that goes along with the rules to demonstrate what initializer “directions” are allowed:

Initializer Chaining

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)