Skip to content

Invalid redeclaration of 'uncheckedRandom(in:using:) #54

Description

@hufkens

When using the latest Xcode (9.3) I get this error:

RandomKit/Sources/RandomKit/Extensions/Swift/Collection+RandomKit.swift:84:17:` Invalid redeclaration of 'uncheckedRandom(in:using:)

in:

extension RandomRetrievableInRange where Self: Collection, Self.Index: RandomInRange, Self.IndexDistance: RandomToValue {

    /// Returns a random element in range without checking whether self or range is empty.
    public func uncheckedRandom<R: RandomGenerator>(in range: Range<Index>, using randomGenerator: inout R) -> Iterator.Element {
        return self[Index.uncheckedRandom(in: range, using: &randomGenerator)]
    }

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions