Open spevans opened 5 years ago
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: https://github.com/apple/swift-corelibs-foundation/blob/e1071a9d90686b74faeabb9b6611cbdc1945d388/Foundation/Unit.swift#L155
required
However removing the modifier leads to other issues:
This line https://github.com/apple/swift-corelibs-foundation/blob/e1071a9d90686b74faeabb9b6611cbdc1945d388/Foundation/Measurement.swift#L324
cc @millenomi
This is an acceptable break from Darwin API as it allows the whole to work; Darwin is fundamentally violating constructor assumptions here.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Foundation | |Labels | Bug, Linux | |Assignee | None | |Priority | Medium | md5: 0df819b3842f101923c78bdfa4d29780Issue Description:
According to https://developer.apple.com/documentation/foundation/unit/1690760-init
should not have a
required
modifier as it does here: https://github.com/apple/swift-corelibs-foundation/blob/e1071a9d90686b74faeabb9b6611cbdc1945d388/Foundation/Unit.swift#L155However removing the modifier leads to other issues:
This line https://github.com/apple/swift-corelibs-foundation/blob/e1071a9d90686b74faeabb9b6611cbdc1945d388/Foundation/Measurement.swift#L324