I found a bug of generated X-Swift.h, but I don't know whether it is a bug of Swift or a bug of Xcode, so I post it here.
A.framework
open class C: NSObject {}
open class O1: NSObject {}
open class O2: NSObject {}
extension O1 {
open class M: C {}
}
extension O2 {
open class M: C {}
}
If I didn't add @objc to O1.M, it will not be seen in A-Swift.h, and it is fine.
But, if I write
extension O1.M {}
extension O2.M {}
It can compile, but it comes to a bug, I cannot use A.framework in other framework.
It is because O1.M and O2.M will be generated in A-Swift.h.
SWIFT_CLASS("_TtCC1A2O21M")
@interface M : C
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
SWIFT_CLASS("_TtCC1A2O11M")
@interface M : C
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
In B.framwork
import A
Duplicate interface definition for class 'M'
Could not build Objective-C module 'A'
Where should I report this bug.
A.framework
open class C: NSObject {}
open class O1: NSObject {}
open class O2: NSObject {}
extension O1 {
open class M: C {}
}
extension O2 {
open class M: C {}
}
O1.M will not be generated to A-Swift.h
B.framework
open class T: O1.M {
}
T will be generated to B-Swift.h
SWIFT_CLASS("_TtC1B1T")
@interface T : M
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
@end
In C.framework
import B
Cannot find interface declaration for 'M', superclass of 'T'
Could not build Objective-C module 'B'