Please provide a Minimal Working Example (MWE) so that we can run the code and see where it is going wrong. The code you gave is using undefined types and functions, in particular the following are missing:
Empty
WithinLength
isfull
_next_circ_idx
You might also want to read: Please read: make it easier to help you
Anyways, if I define some of the missing pieces like
struct Empty{T} <: FillingLevel end
struct WithinLength{T} <: FillingLevel end
isfull(cb::CircularBuffer) = cb.tail >= length(cb.queue)-1
I get the following error
julia> push!(cb1,3,4,5)
ERROR: UndefVarError: _next_circ_idx not defined
Stacktrace:
[1] _push!(::CircularBuffer{Int64}, ::Int64, ::Vararg{Int64})
@ Main ~/wd/scratch/julia/mwe_bombusfragrans.jl:123
...
In the bits of code I have from you _next_circ_idx
only appears in the definition of _push
, so to me it seems to work correctly.
Maybe just try to restart the REPL and run your script again?