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

ListFormatStyle missing #4596

Closed
Tracked by #4619
0xTim opened this issue May 26, 2022 · 5 comments
Closed
Tracked by #4619

ListFormatStyle missing #4596

0xTim opened this issue May 26, 2022 · 5 comments

Comments

@0xTim
Copy link

0xTim commented May 26, 2022

The Objective-C Foundation has a ListFormatStyle for formatting collections as described at https://developer.apple.com/documentation/foundation/listformatstyle. This does not exist in Swift Foundation.

Expected Result:

Using someArrayOfStrings.formatted(.list(type: .and)) works on both macOS and Linux

Actual Result:

.../Something.swift:151:46: error: value of type '[String]' has no member 'formatted'
let formatted = someArrayOfStrings.formatted(.list(type: .and))

Steps to reproduce

let someArrayOfStrings = ["Alice", "Bob", "Charlie"]
let formatted = someArrayOfStrings.formatted(.list(type: .and))
@tomerd
Copy link
Member

tomerd commented May 26, 2022

cc @millenomi

@RandomHashTags
Copy link

same error for URLSession's

public func data(for request: URLRequest, delegate: (URLSessionTaskDelegate)? = nil) async throws -> (Data, URLResponse)

function.

@drewster99
Copy link

same error for URLSession's

public func data(for request: URLRequest, delegate: (URLSessionTaskDelegate)? = nil) async throws -> (Data, URLResponse)

function.

Probably the URLSession one should be a separate Issue.

@0xTim
Copy link
Author

0xTim commented Aug 5, 2022

That's being tracked at #3205

@parkera
Copy link
Member

parkera commented Jul 5, 2024

This is available in swift-foundation, so resolved by #5001

@parkera parkera closed this as completed Jul 5, 2024
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

No branches or pull requests

5 participants