Skip to content

[SR-9789] Use "pretty" nullability in generated ObjC headers #52214

Open
@belkadan

Description

@belkadan
Previous ID SR-9789
Radar None
Original Reporter @belkadan
Type Improvement
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, PrintAsObjC, StarterBug
Assignee @adellibovi
Priority Medium

md5: 0bc925759fd7590c0a91c67c7a5de68f

Issue Description:

Objective-C supports two "pretty" forms for nullability qualifiers: within the parentheses of a method's parameters or return type:

- (id _Nullable)computate:(int * _Nonnull)values;

- (nullable id)computate:(nonnull int *)values;

And in the property attributes list for a property:

@property id _Nullable owner;

@property (nullable) id owner;

PrintAsObjC should adopt these where valid; right now it only uses them in hardcoded cases for instancetype.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions