Navigation Menu

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-10904] DarwinCompatibility: Unit.init(symbol:) should not be a required initialiser #3306

Open
spevans opened this issue Jun 9, 2019 · 2 comments

Comments

@spevans
Copy link
Collaborator

spevans commented Jun 9, 2019

Previous ID SR-10904
Radar None
Original Reporter @spevans
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug, Linux
Assignee None
Priority Medium

md5: 0df819b3842f101923c78bdfa4d29780

Issue Description:

According to https://developer.apple.com/documentation/foundation/unit/1690760-init

Unit.init(symbol:)

should not have a required modifier as it does here:

public required init(symbol: String) {

However removing the modifier leads to other issues:

This line

unit = UnitType(symbol: symbol)

@spevans
Copy link
Collaborator Author

spevans commented Jun 11, 2019

cc @millenomi

@millenomi
Copy link
Contributor

This is an acceptable break from Darwin API as it allows the whole to work; Darwin is fundamentally violating constructor assumptions here.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants