Files
swift-mirror/apinotes/ScriptingBridge.apinotes
Jordan Rose 08b6c5f0c9 [ClangImporter] Add support for 'SwiftImportAsNonGeneric' in API notes (#6962)
Generic Objective-C classes with this annotation will be imported as
non-generic in Swift. The Swift 3 behavior hardcoded a certain set of
class /hierarchies/ as permanently non-generic, and this is preserved
in Swift 3 mode.

Actually using this API note in a versioned way (as opposed to just
marking the class non-generic in all language versions) will cause
horrible source compatibility problems in the mix-and-match cases,
where Swift 3 code presents a non-generic type that Swift 4 expects to
be generic or vice versa.  Fixes for this will come later; right now
it's more important to add support for the feature at all.

To avoid unwanted changes in Swift 4, this commit also adds API notes
to make any existing classes in the previously-hardcoded set continue
to import as non-generic even in Swift 4. The difference is that
/subclasses/ of these classes may come in as generic. (If we want to
make a change here, that can be a separate commit.)

rdar://problem/31226414 (Swift side of rdar://problem/28455962)
2017-04-03 15:39:19 -07:00

6 lines
90 B
Plaintext

---
Name: ScriptingBridge
Classes:
- Name: SBElementArray
SwiftImportAsNonGeneric: true