Context
I am currently working with Protocols and AssociatedTypes and encountered the following new Xcode Warning I don't really understand.
Non-final class 'SomeCustomComponent' cannot safely conform to protocol 'CustomComponent', which requires that 'Self.C.CC' is exactly equal to 'Self'; this is an error in Swift 6
Code
protocol Component {
associatedtype CC: CustomComponent where CC.C == Self
var customComponent: CC { get }
}
protocol CustomComponent {
associatedtype C: Component where C.CC == Self
var component: C { get }
}
enum SomeComponent: Component {
var customComponent: { ... }
}
// Please note, that SomeCustomComponent is an NSManagedObject conforming to CustomComponent.
extension SomeCustomComponent: CustomComponent { // I get the Xcode Warning in this Line.
var component: C { ... }
}
Question
How can I handle this Xcode Warning? Is it possible to mark an NSManagedObject as final? And how do I do it since it is defined in the background?