Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/ZeroDimensionalArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,16 @@ mutable struct BoxConst{T} <: AbstractArray{T, 0}
end
end

const ZeroDimensionalArray = Union{
const ZeroDimensionalArrayCanNotMutateElement = Union{
ZeroDimArray,
Box,
BoxConst,
}

const ZeroDimensionalArray = Union{
ZeroDimensionalArrayCanNotMutateElement,
Box,
}

function type_to_constructor_function(::Type{T}) where {T <: ZeroDimensionalArray}
local ret
if T <: ZeroDimArray
Expand Down Expand Up @@ -158,8 +162,8 @@ end

# https://github.com/JuliaLang/julia/issues/51753
if isdefined(Base, :dataids) && hasmethod(Base.dataids, Tuple{Box{Float32}})
function Base.dataids(a::ZeroDimensionalArray)
Base.dataids(only(a))
Base.@nospecializeinfer function Base.dataids((@nospecialize a::ZeroDimensionalArrayCanNotMutateElement),)
()
end
end

Expand Down