swift
aada983c - Replace supersuperclassConformsTo

Commit
5 years ago
Replace supersuperclassConformsTo This more powerful primitive is capable of 1) Detecting invalid classes 2) Detecting invalid superclasses 3) Detecting circularity in inheritance hierarchies The attached crasher demonstrates the reason we need to validate all of these predicates. Simply put, a circular class hierarchy is always going to report the superclass conforms to any protocol with a declaration in the source. Leveraging this, one could construct any circular class hierarchy, and a conformance to Codable would immediately crash because we got as far as trying to build a CodingKeys enum with an absolutely nonsensical structure. This also has the added benefit of de-complecting an enormous amount of codable conformance code. rdar://66588925
Author
Committer
Parents
Loading