Skip to content

Commit

Permalink
Add more Random.Sampler disambiguation (#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens authored Sep 12, 2023
1 parent 01b5c13 commit b216185
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/adapter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,9 @@ Random.Sampler(::Type{<:AbstractGAPRNG}, x::AbstractUnitRange, ::Random.Repetiti
Random.SamplerTrivial(x)

# avoid ambiguities
Random.Sampler(::Type{<:AbstractGAPRNG}, x::AbstractUnitRange{BigInt}, ::Random.Repetition) =
Random.SamplerTrivial(x)

for U in (Base.BitInteger64, Union{Int128,UInt128})
@eval Random.Sampler(::Type{<:AbstractGAPRNG}, x::AbstractUnitRange{T}, ::Random.Repetition
) where {T<:$U} = Random.SamplerTrivial(x)
Expand Down

0 comments on commit b216185

Please sign in to comment.