We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently it is not possible to use rand with slices of char or enum:
import random let slice = '0'..'F' let r = rand(cslice)
Error: type mismatch: got <char, char> but expected one of: proc `-`[T](x, y: set[T]): set[T] ...
type Op = enum Halt Inc Dec import random let opslice = Halt..Dec let op = rand(opslice)
Same error
The text was updated successfully, but these errors were encountered:
But if we support enum the code could produce invalid values for enums with holes.
Sorry, something went wrong.
Then I think the signature should be T: SomeInteger.
T: SomeInteger
Fine with me.
random: works for slices and enums, fixes nim-lang#7698
241d9b0
9f94199
No branches or pull requests
Currently it is not possible to use rand with slices of char or enum:
Same error
The text was updated successfully, but these errors were encountered: