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

use Swift 4 #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

use Swift 4 #56

wants to merge 1 commit into from

Conversation

omochi
Copy link

@omochi omochi commented May 23, 2018

My environment

macOS High Sierra 10.13.4
Xcode9.3

Problem

I just cloned master and got compile error below.

/Users/omochi/github/omochi/RandomKit/Sources/RandomKit/Extensions/Swift/Collection+RandomKit.swift:100:17: Invalid redeclaration of 'uncheckedRandom(in:using:)'
/Users/omochi/github/omochi/RandomKit/Sources/RandomKit/Extensions/Swift/Collection+RandomKit.swift:75:17: 'uncheckedRandom(in:using:)' previously declared here
/Users/omochi/github/omochi/RandomKit/Sources/RandomKit/Extensions/Swift/Collection+RandomKit.swift:106:73: Type 'Collection.IndexDistance' (aka 'Int') in conformance requirement does not refer to a generic parameter or associated type

The lines with error is in macro section for Swift less than 4.1.
And a xcodeproj set swift version to 3.

Solution

This PR changes Swift version from 3 to 4 and avoid this error.

@omochi omochi mentioned this pull request May 23, 2018
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

Successfully merging this pull request may close these issues.

None yet

1 participant