Skip to content

Update example code to compile with Swift 5.0/5.1 #25995

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

Merged
merged 4 commits into from
Jul 9, 2019
Merged

Update example code to compile with Swift 5.0/5.1 #25995

merged 4 commits into from
Jul 9, 2019

Conversation

GeekAndDad
Copy link
Contributor

@GeekAndDad GeekAndDad commented Jul 8, 2019

Update LazySequence documentation sample code for the "we can build a sequence that lazily computes the elements in the result of scan" example so that it will compile and work for Swift 5.0 & 5.1

Took inspiration from Filter.swift as to modern syntax to use, though didn't convert `private` properties to `internal`.
@theblixguy
Copy link
Collaborator

cc @airspeedswift @natecook1000

@GeekAndDad
Copy link
Contributor Author

GeekAndDad commented Jul 8, 2019

Now that bugs.swift.org is back up an Issue has been created for this defect: https://bugs.swift.org/browse/SR-11084

Removed private scope on properties to enable synthesized initializers; removed previously added explicit initializers; add necessary parameter label.
GeekAndDad and others added 2 commits July 8, 2019 20:35
remove ill advised usability change

Co-Authored-By: Xiaodi Wu <[email protected]>
@xwu
Copy link
Collaborator

xwu commented Jul 9, 2019

@swift-ci Please smoke test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants