Skip to content

Commit 3ead724

Browse files
authored
Fix RefArray(::AbstractArray{T}) method duplication (#47337)
This removes the default argument in `RefArray(x::AbstractArray{T}, i::Integer=1)` such that it does not override `RefArray(x::AbstractArray{T}, i::Int=1)`. Refs: #43262 (comment)
1 parent a4438b3 commit 3ead724

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/refpointer.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ end
113113
RefArray(x::AbstractArray{T}, i::Int, roots::Any) where {T} = RefArray{T,typeof(x),Any}(x, i, roots)
114114
RefArray(x::AbstractArray{T}, i::Int=1, roots::Nothing=nothing) where {T} = RefArray{T,typeof(x),Nothing}(x, i, nothing)
115115
RefArray(x::AbstractArray{T}, i::Integer, roots::Any) where {T} = RefArray{T,typeof(x),Any}(x, Int(i), roots)
116-
RefArray(x::AbstractArray{T}, i::Integer=1, roots::Nothing=nothing) where {T} = RefArray{T,typeof(x),Nothing}(x, Int(i), nothing)
116+
RefArray(x::AbstractArray{T}, i::Integer, roots::Nothing=nothing) where {T} = RefArray{T,typeof(x),Nothing}(x, Int(i), nothing)
117117
convert(::Type{Ref{T}}, x::AbstractArray{T}) where {T} = RefArray(x, 1)
118118

119119
function unsafe_convert(P::Union{Type{Ptr{T}},Type{Ptr{Cvoid}}}, b::RefArray{T})::P where T

0 commit comments

Comments
 (0)