-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[stdlib] Change post-nil guarantee for IteratorProtocol.next() #1702
[stdlib] Change post-nil guarantee for IteratorProtocol.next() #1702
Conversation
SE-0052 is accepted, @dabrahams or @gribozavr, can you please review this? Thanks! |
Oh, also @PatrickPijnappel it looks like this patch has conflicts. Can you please update it when you get a chance? Thanks! |
The wording LGTM, but I'd like @dabrahams to also take a look. |
@lattner @gribozavr Ok, resolved the conflicts!
|
CC @natecook1000 for the documentation style. |
The documentation style ('advances' instead of 'advance') is right on. I think describing the This paragraph could use a note about the behavior, too, since it's giving instructions about how to implement an iterator: https://github.com/apple/swift/pull/1702/files#diff-b9ba8d4ad76ba94c1eeabc504d582b57R120 |
on Wed May 04 2016, Dmitri Gribenko <notifications-AT-github.aaakk.us.kg> wrote:
The summary should be a single sentence fragment; see Dave |
@natecook1000 I'd say the |
@dabrahams Ok moved the guarantee away from the summary, so that's now a single line! |
@natecook1000 @dabrahams Is there a guideline on what information in the protocol's doc comment is restated in the implementation's doc comment btw? |
No such guideline exists. BTW, I was not saying you should move that information out of the summary (nor was I saying you shouldn’t); if it belongs in the summary you can use a semicolon to join the parts instead of a period. |
@dabrahams Is there still something blocking this? |
@natecook1000 Could you review, please? |
@gribozavr LGTM |
@swift-ci Please test and merge |
@gribozavr Build seems to have failed on an unrelated issue. |
Indeed. What I want to test is that SourceKit tests (which sometimes include snippets of the doc comments) are not affected by this change. |
@swift-ci Please smoke test |
Tests have passed, merging! |
What's in this pull request?
Swift evolution proposal: swiftlang/swift-evolution#213
Swift evolution thread: http://thread.gmane.org/gmane.comp.lang.swift.evolution/focus=8519
Update from #1544 to resolve conflicts with master.
Changes the guarantee for
IteratorProtocol.next()
to:All
IteratorType
implementations in the standard library already comply.