mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[TBDGen] Add support for Objective-C Categories.
Emit Objective-C Categories for extensions that have the @objc attribute directly (or indirectly via one of its methods, subscripts, etc) attached. Also associate and emit all methods for that category into the API JSON file. This fixes rdar://94734748.
This commit is contained in:
@@ -92,6 +92,7 @@ public class MyClass2 : NSObject {
|
||||
// CHECK-NEXT: "classMethods": []
|
||||
// CHECK-NEXT: }
|
||||
// CHECK-NEXT: ],
|
||||
// CHECK-NEXT: "categories": [],
|
||||
// CHECK-NEXT: "version": "1.0"
|
||||
// CHECK-NEXT: }
|
||||
|
||||
@@ -264,12 +265,12 @@ public class MyClass2 : NSObject {
|
||||
// CHECK-SPI-NEXT: "super": "NSObject",
|
||||
// CHECK-SPI-NEXT: "instanceMethods": [
|
||||
// CHECK-SPI-NEXT: {
|
||||
// CHECK-SPI-NEXT: "name": "init",
|
||||
// CHECK-SPI-NEXT: "name": "spiMethod",
|
||||
// CHECK-SPI-NEXT: "access": "private",
|
||||
// CHECK-SPI-NEXT: "file": "/@input/MyModule.swiftmodule"
|
||||
// CHECK-SPI-NEXT: },
|
||||
// CHECK-SPI-NEXT: {
|
||||
// CHECK-SPI-NEXT: "name": "spiMethod",
|
||||
// CHECK-SPI-NEXT: "name": "init",
|
||||
// CHECK-SPI-NEXT: "access": "private",
|
||||
// CHECK-SPI-NEXT: "file": "/@input/MyModule.swiftmodule"
|
||||
// CHECK-SPI-NEXT: }
|
||||
@@ -284,18 +285,19 @@ public class MyClass2 : NSObject {
|
||||
// CHECK-SPI-NEXT: "super": "NSObject",
|
||||
// CHECK-SPI-NEXT: "instanceMethods": [
|
||||
// CHECK-SPI-NEXT: {
|
||||
// CHECK-SPI-NEXT: "name": "init",
|
||||
// CHECK-SPI-NEXT: "access": "public",
|
||||
// CHECK-SPI-NEXT: "name": "spiMethod",
|
||||
// CHECK-SPI-NEXT: "access": "private",
|
||||
// CHECK-SPI-NEXT: "file": "/@input/MyModule.swiftmodule"
|
||||
// CHECK-SPI-NEXT: },
|
||||
// CHECK-SPI-NEXT: {
|
||||
// CHECK-SPI-NEXT: "name": "spiMethod",
|
||||
// CHECK-SPI-NEXT: "access": "private",
|
||||
// CHECK-SPI-NEXT: "name": "init",
|
||||
// CHECK-SPI-NEXT: "access": "public",
|
||||
// CHECK-SPI-NEXT: "file": "/@input/MyModule.swiftmodule"
|
||||
// CHECK-SPI-NEXT: }
|
||||
// CHECK-SPI-NEXT: ],
|
||||
// CHECK-SPI-NEXT: "classMethods": []
|
||||
// CHECK-SPI-NEXT: }
|
||||
// CHECK-SPI-NEXT: ],
|
||||
// CHECK-SPI-NEXT: "categories": [],
|
||||
// CHECK-SPI-NEXT: "version": "1.0"
|
||||
// CHECK-SPI-NEXT: }
|
||||
|
||||
Reference in New Issue
Block a user