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

[SR-12671] URLResponse.init is not accessible in FoundationNetworking #4388

Open
swift-ci opened this issue Apr 25, 2020 · 1 comment · May be fixed by #4778
Open

[SR-12671] URLResponse.init is not accessible in FoundationNetworking #4388

swift-ci opened this issue Apr 25, 2020 · 1 comment · May be fixed by #4778

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-12671
Radar rdar://problem/62895021
Original Reporter Saklad5 (JIRA User)
Type Bug
Environment

I have confirmed that the initializer exists in the Darwin version of Foundation on macOS 10.15.4, but not in commit b83118f (the master branch at the time of this writing) of the platform-agnostic version.

The initializer is also inaccessible when using Swift 5.2.2 on Ubuntu 18.04.4, which is what prompted this issue in the first place.

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: a2d3e8f034811a8c4f5024156635cbd9

Issue Description:

The Darwin version of Foundation has parameter-less initializers for URLResponse and its subclasses, which are somewhat useful for writing unit tests. These are not present in FoundationNetworking, for reasons that are somewhat unclear.

In other words, the following works with the Darwin version alone:

let mock = URLResponse()
@beccadax
Copy link
Contributor

beccadax commented May 5, 2020

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
@woxtu woxtu linked a pull request Jun 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants