-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
rand(rng, UnitRange{Char}) defined but not callable #13600
Labels
domain:randomness
Random number generation and the Random stdlib
Comments
rfourquet
added
the
domain:randomness
Random number generation and the Random stdlib
label
Aug 27, 2017
rfourquet
added a commit
that referenced
this issue
Sep 1, 2017
Cf. #13600 and https://github.com/JuliaLang/julia/pull/22752/files#r128026174. Also, changing `Union{Signed,Unsigned,BigInt,Bool}` to `Integer`, as this is equivalent in practice.
rfourquet
added a commit
that referenced
this issue
Sep 5, 2017
Cf. #13600 and https://github.com/JuliaLang/julia/pull/22752/files#r128026174. Also, changing `Union{Signed,Unsigned,BigInt,Bool}` to `Integer`, as this is equivalent in practice.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rand{T<:Union{Signed,Unsigned,BigInt,Bool,Char}}(rng::AbstractRNG, r::UnitRange{T}) = rand(rng, RangeGenerator(r))
defined atjulia/base/random.jl
Line 569 in 6e4c9f1
T<:Char
since the definition ofUnitRange
assertsT<:Real
. This appears to be harmless (e.g dead code) since the fallbackrand(rng::AbstractRNG, r::AbstractArray)
forChar(1):Char(3)
, akaStepRange{Char,Int64}
works.The text was updated successfully, but these errors were encountered: