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

Sequence extension with sorted(by:) function should be internal #279

Open
qizh opened this issue Apr 13, 2023 · 1 comment
Open

Sequence extension with sorted(by:) function should be internal #279

qizh opened this issue Apr 13, 2023 · 1 comment
Assignees

Comments

@qizh
Copy link

qizh commented Apr 13, 2023

public extension Sequence {
func sorted<T: Comparable>(by keyPath: KeyPath<Element, T>) -> [Element] {

So it won't pollute code suggestions for projects using this library.
Also many libraries or projects have similar function implemented, usually with the same definition.

In some cases it can even produce a warning in Xcode 14.
When function with the same name is used in inlinable code when InstantSearchCore is added to the project but is not imported in this specific file.

Warning screenshot

@VladislavFitz VladislavFitz self-assigned this May 31, 2023
@qizh
Copy link
Author

qizh commented Nov 16, 2023

Still the case in Xcode 15

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

2 participants