mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When a subclass inherits from a superclass that declares a no-args desginated initializer and no other visible inits, the subclass may elide calls to 'super.init()'. The way this was enforced was by looking into the superclass *from the subclass' init*, not from the subclass. This ensured that not only would we get results for initializers, we'd get results for initializers that were actually _callable_ from the subclass. The changes in apple/swift#33515 accidentally swapped the decl context here, which caused this lookup to start returning additional results. In that case, we consider it ambiguous as to which designated initializer we should synthesize, and so we bail. The net result is DI errors where there previously were none. Let's put this back in order. rdar://67560590, rdar://67686660, rdar://67690116, SR-13427