Skip to content

No OneTo method for ZZRingElem #5542

@mjrodgers

Description

@mjrodgers

Apparently we don't have this defined, it causes some problems with some of the combinatorics methods (that have special constructors using OneTo, for instance combinations.

Is there a way for us to extend this method to allow ZZRingElem arguments?

julia> combinations(ZZ(3),ZZ(2))
ERROR: MethodError: no method matching Base.OneTo(::ZZRingElem)

Closest candidates are:
  Base.OneTo(::AbstractRange{T}) where T<:Integer
   @ Base range.jl:468
  Base.OneTo(::T) where T<:Integer
   @ Base range.jl:467

Stacktrace:
 [1] oneto(r::ZZRingElem)
   @ Base ./range.jl:469
 [2] combinations(n::ZZRingElem, k::ZZRingElem; inplace::Bool)
   @ Oscar ~/.julia/dev/Oscar/src/Combinatorics/EnumerativeCombinatorics/combinations.jl:25
 [3] combinations(n::ZZRingElem, k::ZZRingElem)
   @ Oscar ~/.julia/dev/Oscar/src/Combinatorics/EnumerativeCombinatorics/combinations.jl:25
 [4] top-level scope
   @ REPL[19]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions