Skip to content

Adopt lightweight generics for generic functions #325

Open
@itingliu

Description

@itingliu

Functions that take a generic argument should adopt light weight generics and refer to the type directly as the argument type.

For example,

public func contains<C: Collection>(_ other: C) -> Bool

would be

public func contains(_ other: some Collection<Element>) -> Bool

Adoption of standard library types is blocked by swiftlang/swift#41843

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions