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

[4.0] Allow classes to share an Encoder with superclass #10538

Merged
merged 1 commit into from Jun 23, 2017

Conversation

Projects
None yet
2 participants
@itaiferber
Contributor

itaiferber commented Jun 23, 2017

What's in this pull request?
Cherry-picks #10520 to swift-4.0-branch.

Explanation: On encode, we previously treated every container request as a push; instead, we should allow the same container type to be requested multiple times so a class can pass its Encoder directly to its superclass if it needs to.
Scope: Affects anyone trying to share an Encoder with their superclass when using JSONEncoder and PropertyListEncoder.
Radar: rdar://problem/32927085
Risk: Low
Testing: Adds unit tests to JSONEncoder and PlistEncoder to confirm expected behavior.

Allow classes to share an Encoder with superclass
On encode, we previously treated every container request as a push;
instead, we should allow the same container type to be requested
multiple times so a class can pass its Encoder directly to its
superclass if it needs to.
@itaiferber

This comment has been minimized.

Show comment
Hide comment
@itaiferber

itaiferber Jun 23, 2017

Contributor

@swift-ci Please test

Contributor

itaiferber commented Jun 23, 2017

@swift-ci Please test

@parkera parkera merged commit 074d939 into apple:swift-4.0-branch Jun 23, 2017

4 checks passed

Swift Test Linux Platform 9958 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 40040 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details

@itaiferber itaiferber deleted the itaiferber:4.0-foundation-shared-encoders branch Jun 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment