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

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

Merged

Conversation

itaiferber
Copy link
Contributor

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.

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
Copy link
Contributor Author

@swift-ci Please 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.

None yet

2 participants