Skip to content

Commit 28b79eb

Browse files
authored
Merge pull request swiftlang#21752 from nkcsgexi/test-init
2 parents 749f319 + 8817404 commit 28b79eb

File tree

5 files changed

+32
-0
lines changed

5 files changed

+32
-0
lines changed

test/api-digester/Inputs/APINotesLeft/APINotesTest.h

+4
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ extern int ANTGlobalValue;
3030
extern NSString * _Null_unspecified globalAttributeName;
3131

3232
typedef NSString * CatAttributeName;
33+
34+
@interface Cat
35+
- (nonnull instancetype) initWithName:(nullable NSString*) name;
36+
@end

test/api-digester/Inputs/APINotesRight/APINotesTest.h

+5
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,8 @@ typedef NSString * AnimalAttributeName NS_STRING_ENUM;
3030
extern AnimalAttributeName globalAttributeName;
3131

3232
typedef NSString * CatAttributeName NS_STRING_ENUM;
33+
34+
35+
@interface Cat
36+
- (nullable instancetype) initWithName:(nullable NSString*) name;
37+
@end

test/api-digester/Outputs/apinotes-diags.txt

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ APINotesTest(APINotesTest.h): Var OldType.oldMember has been renamed to Var NewT
1919
APINotesTest(APINotesTest.h): Var globalAttributeName has been renamed to Var AnimalAttributeName.globalAttributeName
2020

2121
/* Type Changes */
22+
APINotesTest(APINotesTest.h): Constructor Cat.init(name:) has return type change from Cat to Cat?
2223
APINotesTest(APINotesTest.h): Func AnimalStatusDescriptor.addingAttributes(_:) has parameter 0 type change from [String : Any] to [AnimalAttributeName : Any]
2324
APINotesTest(APINotesTest.h): Func AnimalStatusDescriptor.addingAttributesArray(_:) has parameter 0 type change from [String] to [AnimalAttributeName]
2425
APINotesTest(APINotesTest.h): Func AnimalStatusDescriptor.addingOptionalAttributes(_:) has parameter 0 type change from [String : Any]? to [AnimalAttributeName : Any]?

test/api-digester/Outputs/apinotes-migrator-gen-revert.json

+11
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@
153153
"RightComment": "String",
154154
"ModuleName": "APINotesTest"
155155
},
156+
{
157+
"DiffItemKind": "CommonDiffItem",
158+
"NodeKind": "Constructor",
159+
"NodeAnnotation": "UnwrapOptional",
160+
"ChildIndex": "0",
161+
"LeftUsr": "c:objc(cs)Cat(im)initWithName:",
162+
"LeftComment": "",
163+
"RightUsr": "",
164+
"RightComment": "",
165+
"ModuleName": "APINotesTest"
166+
},
156167
{
157168
"DiffItemKind": "CommonDiffItem",
158169
"NodeKind": "TypeDecl",

test/api-digester/Outputs/apinotes-migrator-gen.json

+11
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@
153153
"RightComment": "AnimalAttributeName",
154154
"ModuleName": "APINotesTest"
155155
},
156+
{
157+
"DiffItemKind": "CommonDiffItem",
158+
"NodeKind": "Constructor",
159+
"NodeAnnotation": "WrapOptional",
160+
"ChildIndex": "0",
161+
"LeftUsr": "c:objc(cs)Cat(im)initWithName:",
162+
"LeftComment": "",
163+
"RightUsr": "",
164+
"RightComment": "",
165+
"ModuleName": "APINotesTest"
166+
},
156167
{
157168
"DiffItemKind": "CommonDiffItem",
158169
"NodeKind": "TypeDecl",

0 commit comments

Comments
 (0)