-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
Description
I consistently (across multiple Julia versions) have found a couple of invalidations whenever I define a new AbstractUnitRange{Int}
type. It usually starts with a method like last(::OrdinalRange)
but usually I can trace the issue back to last(::Slice)
. It's gotten a lot better in more recent releases (on v8.2 it only causes 2 invalidations), but I figured enough code interacts with Slice
it was worth being proactive about it becoming a bigger issue later on.
I think it could be fixed if we changed its definition from Slice{T<:AbstractUnitRange} <: AbstractUnitRange{Int}
to Slice{T<:AbstractUnitRange{Int} <: AbstractUnitRange{Int}
. Is there any reason we don't enforce the indices have this subtype?