Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-2860] */ in Swift documentation comment makes ObjC header file corrupt #45454

Closed
belkadan opened this issue Oct 5, 2016 · 4 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers PrintAsClang Area → compiler: The PrintAsClang library

Comments

@belkadan
Copy link
Contributor

belkadan commented Oct 5, 2016

Previous ID SR-2860
Radar rdar://problem/28350923
Original Reporter @belkadan
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, PrintAsObjC, StarterBug
Assignee dmc (JIRA)
Priority Medium

md5: 67222fba65c55e69c00a9949e8288aa7

Issue Description:

If a Swift documentation comment contains */, it gets imported as well, resulting in something like:

/**
  Paid date. */
*/
@property (nonatomic, copy) NSDate * _Nullable paidDate;

in the Project-Swift.h header file, making it unusable.

The original documentation:

/// Paid date. */
@NSManaged open var paidDate: Date?
@belkadan
Copy link
Contributor Author

belkadan commented Oct 5, 2016

The most correct thing is to use /// in PrintAsObjC instead of /**. The next best thing would be to insert a dummy space or something (* /), but that doesn't seem like it'd be too much easier than just using ///—either way you have to split up the docstring.

@swift-ci
Copy link
Collaborator

Comment by Daniel Martín (JIRA)

I'll start working on this.

@swift-ci
Copy link
Collaborator

Comment by Daniel Martín (JIRA)

PR is submitted for review: #5542

@swift-ci
Copy link
Collaborator

Comment by Daniel Martín (JIRA)

I'm closing this as the PR has been merged.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself good first issue Good for newcomers PrintAsClang Area → compiler: The PrintAsClang library
Projects
None yet
Development

No branches or pull requests

2 participants