-
Notifications
You must be signed in to change notification settings - Fork 593
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
Fix Bugs in How 'slice2swift' Handled 'misc' Comment Components #3008
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -657,7 +657,7 @@ SwiftGenerator::writeDocSummary(IceInternal::Output& out, const ContainedPtr& p) | |
|
||
if (!doc.misc.empty()) | ||
{ | ||
out << "///" << nl; | ||
out << nl << "///"; | ||
writeDocLines(out, doc.misc); | ||
} | ||
|
||
|
@@ -789,8 +789,8 @@ SwiftGenerator::writeOpDocSummary(IceInternal::Output& out, const OperationPtr& | |
|
||
if (!doc.misc.empty()) | ||
{ | ||
out << nl; | ||
writeDocLines(out, doc.misc, false); | ||
Comment on lines
-792
to
-793
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the part that fixes #2088. The
With no leading triple slash, which rightfully angered the compiler. Now, we generate:
|
||
out << nl << "///"; | ||
writeDocLines(out, doc.misc); | ||
} | ||
} | ||
|
||
|
@@ -838,7 +838,8 @@ SwiftGenerator::writeProxyDocSummary(IceInternal::Output& out, const InterfaceDe | |
|
||
if (!doc.misc.empty()) | ||
{ | ||
writeDocLines(out, doc.misc, false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was arguably worse than #2088. It caused us to just slap the
versus what we now generate:
|
||
out << nl << "///"; | ||
writeDocLines(out, doc.misc); | ||
} | ||
} | ||
|
||
|
@@ -878,7 +879,8 @@ SwiftGenerator::writeServantDocSummary(IceInternal::Output& out, const Interface | |
|
||
if (!doc.misc.empty()) | ||
{ | ||
writeDocLines(out, doc.misc, false); | ||
out << nl << "///"; | ||
writeDocLines(out, doc.misc); | ||
} | ||
} | ||
|
||
|
@@ -907,6 +909,7 @@ SwiftGenerator::writeMemberDoc(IceInternal::Output& out, const DataMemberPtr& p) | |
|
||
if (!doc.misc.empty()) | ||
{ | ||
out << nl << "///"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added an extra newline to the comment, to be consistent with how we generate other sections. Also, I just think it looks better. |
||
writeDocLines(out, doc.misc); | ||
} | ||
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have 0 testing of comments in I manually checked the output of this to make sure it looked good, and it will catch future errors which might introduce un-compilable code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was just backwards, causing us to generate:
Now we generate: