We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e050ab6 commit 08445afCopy full SHA for 08445af
base/refpointer.jl
@@ -33,7 +33,7 @@ end
33
34
### General Methods for Ref{T} type
35
36
-eltype(x::Type{Ref{T}}) where {T} = T
+eltype(x::Type{<:Ref{T}}) where {T} = @isdefined(T) ? T : Any
37
convert(::Type{Ref{T}}, x::Ref{T}) where {T} = x
38
39
# create Ref objects for general object conversion
test/core.jl
@@ -6010,3 +6010,6 @@ g25907a(x) = x[1]::Integer
6010
@test g25907a(Union{Int, UInt, Nothing}[1]) === 1
6011
g25907b(x) = x[1]::Complex
6012
@test g25907b(Union{Complex{Int}, Complex{UInt}, Nothing}[1im]) === 1im
6013
+
6014
+#issue #26363
6015
+@test eltype(Ref(Float64(1))) === Float64
0 commit comments