[SR-7783] Cannot subclass NSString
due to ExpressibleByStringLiteral
initializer
#3691
Labels
NSString
due to ExpressibleByStringLiteral
initializer
#3691
Additional Detail from JIRA
md5: 7ca07235bdf43a633e747405b099e091
Issue Description:
Normally, you can't add conformance to `ExpressibleByStringLiteral` in a class extension for a non-final class. But somehow Foundation manages to do it. As a consequence, you can't create a subclass of `NSString` or `NSMutableString` because you can't override the required initializer because it comes from an extension.
If you write this:
You get fix-its telling you to add these:
But there's no way to get the last one to compile because:
"Overriding declarations in extensions is not supported"
Xcode 9.3 (9E145)
The text was updated successfully, but these errors were encountered: