Closed LukasLiebl closed 6 years ago
I guess we have a name conflict here. Swift 4.2 defines a (for swift unavailable) Bool.random(using: &RandomNumberGenerator)
. @achelsmar Do you know a way to define our Bool.random
only for swift < 4.2?
I think this could help: https://github.com/apple/swift-evolution/blob/master/proposals/0141-available-by-swift-version.md
But haven't used it yet.
It does! Awesome! I wasn't aware of the obsoleted
parameter here. Unfortunately there is this stupid (not really, but it makes my life hard right now) compatibility layer. So depending on which Xcode version you are using the Bool.random()
is defined (by swift) or not. If you use Xcode 10 with Swift 4 it is defined, if you use Xcode 9 with Swift 4 it is not. Unfortunately the only Idea I have is to add a @available(swift, obsoleted: 4)
, where then it only is available for swift versions smaller than 4 (which doesn't make to much sense, since it wouldn't build at all).
What do you think about creating a 4.2 branch, removing this function there and keeping it on the side as long as 4.2 is not released?
Sure. We can do that. But as far as I remember bytes is still on swift 3.2, isn't it? So how about convert develop to Swift 4.1 And then create a swift4.2 branch.
Develop is actually already on 4.1 😊
This just got merged.
Hey,
I just discovered an issue with the .random() function in the extension for Bool. If you want to use it in XCode 10 Beta 2 (I guess it is also valid for beta 3 - but I didn't test that) XCode complains about an "ambiguous use of 'random()'".